Terminating a command-line program... ?

Booting, installing, newbie
Post Reply
Message
Author
wacossusca34
Posts: 48
Joined: Sun 29 May 2011, 15:41

Terminating a command-line program... ?

#1 Post 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

Bruce B

#2 Post 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.

~

wacossusca34
Posts: 48
Joined: Sun 29 May 2011, 15:41

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

#3 Post 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

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#4 Post 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` .

Bruce B

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

#5 Post 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

~

Post Reply