[NTLUG:Discuss] Weird Script behaviour -- killing script does not kill child processes - Why?
Stephen Davidson
gorky at freenet.carleton.ca
Wed Dec 5 08:12:36 CST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Wayne.
I will get into the theory later (thsnks!), right now I need a practical
solution. And yours, with the Java Process launching in the
background, looks like it will neatly wrap up that startproc issue I am
having as well.
Q: Do you know if I will still need to use the Java Bin as the process
to check/act on for the CheckProc/KillProc commands?
Regards,
Steve
Wayne Walker wrote:
> in your script, somewhere you call java, no matter how complicated the script is.
> on the very next line do:
>
> echo $! > /foo.manual.pid
>
> Now you have a pid file you can trust.
>
> As to why killing the parent script doesn't kill the child, that's a
> long discussion about signal handlers. "man signal" once you read that,
> if you still want to know more, email me on or off list.
>
> On Tue, Dec 04, 2007 at 06:22:58PM -0600, Stephen Davidson wrote:
[snip to save bandwidth]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org
iD8DBQFHVrHTPtiPEDq7o8YRAoppAKDHMjJLI5QhtSmomL7redav0tUDNgCg0agd
aaCB6rlh10xpOdZ6sFcNzXs=
=Biu4
-----END PGP SIGNATURE-----
More information about the Discuss
mailing list