Page 1 of 1

Terminating a command-line program... ?

Posted: Sun 29 May 2011, 15:47
by wacossusca34
Hey people,

I run a java based game server, and it runs from command line. I use the hotkey: ctl+alt+backspace to kill "x" before running it, to speed things up, but right now i'm finding myself with that server software completely frozen. The computer is not overloaded, the program is just not accepting commands into it, so i simply can't initiate stop. I don't want to shut down the computer and lose all of the precious data, and i don't know what to do to terminate the application, or shutdown saving all of my data.

Any help appreciated, thank you. :P

Posted: Sun 29 May 2011, 15:52
by Bruce B
I send first a kill signal 15 which is gentle and the application will close and saver back the data.

I wrote a utility to do this recently.

First see if you have htop, it is also easy to use. Give it a sig 15 and for a nasty kill if needed a sig 9

If what I write doesn't make sense, it's because it new stuff. Htop will make it clear.

~

Re: Terminating a command-line program... ?

Posted: Sun 29 May 2011, 15:56
by wacossusca34
wacossusca34 wrote:Hey people,

I run a java based game server, and it runs from command line. I use the hotkey: ctl+alt+backspace to kill "x" before running it, to speed things up, but right now i'm finding myself with that server software completely frozen. The computer is not overloaded, the program is just not accepting commands into it, so i simply can't initiate stop. I don't want to shut down the computer and lose all of the precious data, and i don't know what to do to terminate the application, or shutdown saving all of my data.

Any help appreciated, thank you. :P
Fixed. Handy Ctl Alt Delete.

:P

Posted: Sun 29 May 2011, 16:51
by Karl Godt
from /etc/inittab :
::ctrlaltdel:/sbin/reboot
works also in console mode and even without busybox init running [as Nr.1 of all processes] .

In busybox ash you use Contrl+d to interrupt a running command and in bash Cntrl+c .

If you can not get any keys to work on `tty`[1] , switch to another terminal with Cntrl+Alt+F[2-3] in Pup5 [2-4] in Pup4 .

You can change the lines in /etc/inittab using the e3 console editor .
( for password ...)

Other commands are `openvt [-c 7 -s top] &` and `chvt` , `deallocvt` .

Re: Terminating a command-line program... ?

Posted: Sun 29 May 2011, 17:13
by Bruce B
wacossusca34 wrote:Fixed. Handy Ctl Alt Delete.
Does the computer reboot when you do that?

I forget to mention the first thing to try is Ctrl+C

~