Re: how to send control-break or ctrl-c signal to background process?
From: Logan Shaw (lshaw-usenet_at_austin.rr.com)
Date: 09/28/03
- Next message: Erik Max Francis: "Re: how to send control-break or ctrl-c signal to background process?"
- Previous message: mei: "Help: Problem with backup, scsi transport failed"
- In reply to: walala: "how to send control-break or ctrl-c signal to background process?"
- Next in thread: Erik Max Francis: "Re: how to send control-break or ctrl-c signal to background process?"
- Reply: Erik Max Francis: "Re: how to send control-break or ctrl-c signal to background process?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 28 Sep 2003 03:05:13 GMT
walala wrote:
> I have sent a job to run in background... However I now want to gracefully
> terminate it. This software has a good property that if I press
> control-break, or ctrl-c, it will enter into a graceful termination mode
> that it can still give me some partial useful information... so I don't want
> to use "kill -9" to kill it...
It is possible to use "kill" without typing "-9", you know...
> instead, since it is run in background, I hope I can sent it a control-break
> or ctrl-c signal then it can output some partial useful information to the
> log file and then gracefully shutdown...
Just type "kill 1234", where "1234" is the process number.
This is short for "kill -INT 1234", which sends a SIGINT
signal to the process.
As it turns out, this just what happens to the process if you
hit Control-C. The terminal driver intercepts the Control-C
character and sends a SIGINT to "all foreground processes".
(You might also be interested to know that Control-Z sends a
SIGTSTP signal to a process.) If you want, you can change
which characters do this by using "stty". "man termio" will
give you more information about the settings.
- Logan
- Next message: Erik Max Francis: "Re: how to send control-break or ctrl-c signal to background process?"
- Previous message: mei: "Help: Problem with backup, scsi transport failed"
- In reply to: walala: "how to send control-break or ctrl-c signal to background process?"
- Next in thread: Erik Max Francis: "Re: how to send control-break or ctrl-c signal to background process?"
- Reply: Erik Max Francis: "Re: how to send control-break or ctrl-c signal to background process?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|