LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] i killed the head but the body keeps moving

[ILUG] i killed the head but the body keeps moving

Padraig Brady padraig at antefacto.com
Wed May 22 12:30:01 IST 2002


I think the shell will only kill it's children
on a signal when it's interactive, and in summary
I don't know how to get around this.

As a side note, I find the following very useful for seeing the
process tree hierarchy of the system: watch -n1 pstree -p

If you're using bash, it at least does the following:

When bash is a login shell it will NOT kill children on SIGHUP.
When bash is a non interactive shell it will NOT kill children on exit.
When bash is interactive, it ignores SIGTERM.
In all cases, bash ignores SIGQUIT.
If job control is in effect, bash ignores SIGTTIN, SIGTTOU, and SIGTSTP.
signals of jobs started by bash are set to the same as bash's parent.
Background jobs (jobs started with &) ignore SIGINT and SIGQUIT.
and to be complete, commands run as a result of command substitution 
ignore the keyboard-generated job control signals SIGTTIN, SIGTTOU, and 
SIGTSTP.

I only skimmed the following but it seemed useful/related:
http://www.cons.org/cracauer/sigint.html

Padraig.

Hunt, Bryan wrote:
> Quick question .....
> 
> A script calls a java program (a web server) ie 
> ./build.sh jetty-smart &
> processnum=$! 
> 
> Then i sleep ...
> sleep 60 
> 
> Then I run another task ....
> ./build.sh unittests
> 
> Then I want to kill the web server ...
> kill ${processnum} 
> 
> The problem is that this kills the head but the webserver and all its
> processes continue on in zombie mode .... 
> 
> Is there a specific signal that I should be using here or is it going to be
> a problem regardless cause of dodgy pthread related problems ?
> 
> Ta 
> --B





More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell