CD Eject Interrupt - Possible? [closed] - bash

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
This may seem absurd and it surely is, but I have my reasons.
Running "eject -T" will open/close the CD tray. But the subsequent iterations of the command automatically wait until the tray has physically completed the function (completely closed/opened).
My question... is there a way to interrupt this and process the next command? For example, lets open the tray for about 300ms then close it.
I don't mind using other languages to do this, but can anyone send me in the right direction? Tech docs? etc...
Thanks!

I looked at the source for "eject", it calls ioctl. So it looks impossible to me from that level. I'm unfamiliar with ioctl code, but I believe it doesn't do anything also that would allow you to interrupt it. The only alternative I can think of would be writing a new CD driver... but even then there's a chance that it's not possible. You'll have to dig deep in the kernels of Linux to find a way.

Related

How to Exit An App in Terminal While Leaving it Running in Background [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
I learned how do to do this in my Linux class last year, but can't for the life of me remember how to do it. I've google searched probably about 30 different combinations of words to try to find out how, but nothing is turning up the correct search.
I'm trying to recall how to close an application (Like pico or emacs) and leave it running in the background.
Additionally, it might be nice to know how to pick that app back up where I left off, which I never learned. Any help would be much appreciated.
When using Bash and some other shells, you can use Ctrl+Z suspend a program then run "fg" to bring it back to the foreground. If you want the program to continue running in the background, typing "bg" will resume the process. If the process prints any output while it's in the background, your display will probably end up being mangled.
For simple commands, instead running your application directly, call it using nohup like this:
nohup ./myScript.sh &
Or alternatively for something like complex like emacs, you can use screen.

Handling files in Windows like on the Mac [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
It can this is a silly question, but is it possible to handle files on Windows (XP, Vista or 7) like on the Mac?
I clarify: on the Mac you can rename or move a file even if it is currently used by an application, on Windows you simply cannot! There is a way to change this behavior with some black magic on the Registry?
If you are interested You can read about File locking and specific implementations in Windows and Mac here
http://en.wikipedia.org/wiki/File_locking
I use unlocker to get around this problem in Windows. It's quite handy
http://www.emptyloop.com/unlocker/
No, there is no builtin solution to your problem and I haven't heard of any tool accomplishing that.
It's not possible because the file handling is done in a different way, which is also strongly influenced by the features of the different filesystems.

Where is the "shut down" program located? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
In windows 7 when you click start...then the shut down button. what program is it calling to do the work?
You can always use where.exe to find things like this:
C:\>where shutdown.exe
C:\Windows\system32\shutdown.exe
There is a command-line process "shutdown.exe" which is generally the go-to for programmatic shutdowns/restarts.
http://technet.microsoft.com/en-us/library/bb491003.aspx
This does the actual shutting down. The various windows or dialogs you see asking you to choose how you want to shut down (shut down, sleep, hibernate, restart, log off) and/or asking you to confirm you want to do what you said you did are just part of the taskbar/start menu program, explorer.exe (which is also the Windows Explorer executable).
C:\Windows\System32\shutdown.exe
Though this is definitely not a Stack Overflow question.

Opening the Add/Remove Programs dialog takes too much time [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 13 years ago.
Improve this question
I'm on a WinXP Pro SP3 box. Some time ago, I noticed that opening the Add/Remove programs window takes a lot of time. The window itself opens, but it's building the list that takes so long. I fired FileMon from SysInternals, and it turned out that the process that's supposed to list the programs tries to open every file on my HD.
Anybody experienced this? Any cure?
Thanks
ulu
This is not a programming question, but the answer is sorta cool (and a good heads-up for those writing installers):
It's scanning because some programs don't provide enough information when they're installed.

How to force delete a file? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
This question exists because it has
historical significance, but it is not
considered a good, on-topic question
for this site, so please do not use it
as evidence that you can ask similar
questions here.
How can i force Windows XP to delete file that is currently being used by some application?
You have to close that application first. There is no way to delete it, if it's used by some application.
UnLock IT is a neat utility that helps you to take control of any file or folder when it is locked by some application or system. For every locked resource, you get a list of locking processes and can unlock it by terminating those processes. EMCO Unlock IT offers Windows Explorer integration that allows unlocking files and folders by one click in the context menu.
There's also Unlocker (not recommended, see Warning below), which is a free tool which helps locate any file locking handles running, and give you the option to turn it off. Then you can go ahead and do anything you want with those files.
Warning: The installer includes a lot of undesirable stuff. You're almost certainly better off with UnLock IT.

Resources