When running a program that goes into an infinite loop in the terminal, how would I bring back the command prompt?
(I'm using Fedora core 5)
|
When running a program that goes into an infinite loop in the terminal, how would I bring back the command prompt? (I'm using Fedora core 5) |
||||
|
|
You could send a SIGHUP (Ctrl-Z) or SIGTERM (Ctrl-C). The former merely pauses the program, you may resume with |
|||
|
|
|
Launch the program with
Using |
|||
|
|
|
There is no way to prove that any arbitrary program will ever end without actually running it to the end. Having said that, it is possible to set up a watchdog via e.g. D-Bus that can kill a program if a response is not received within a given amount of time. |
|||
|
|
|
Either Ctrl-C as mentioned, or if that should not work, open another terminal, find the process using ps -ef|grep , find the process ID (pid), and use the kill command: kill -9 |
|||
|
|
|
As mentioned, you can simply add a & to the command line. You can also hit CTRL-Z (this puts the process in the Stopped state), and then type bg to get it running in the background again... |
|||
|
|