[NTLUG:Discuss] Weird Script behaviour -- killing script does not kill child processes - Why?
Stephen Davidson
gorky at freenet.carleton.ca
Tue Dec 4 18:35:36 CST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Stephen Davidson wrote:
> Greetings.
>
> I've been working on a piece of Server software and have been having fun
> and games with startproc.
>
> The general idea:
> Due to a fairly complex command line, I have a shell script that is
> actually launching the server process. The server process is a Java
> process running as a child of that shell script.
>
> The minor issue - even though the -p /file.pid is used, no pid file is
> getting created.
>
> The MAJOR issue - when the Shell script that launched the java process
> is killed, either by startproc or otherwise, the child Java Process is
> NOT killed.
>
> Any ideas on how to kill a child process of a command line script
> automatically, when there is no PID stored during startup?
>
> -Steve
I forgot to mention -- when I attempted to Google this issue, Google
only came up with (many) random entries on using Kill to stop a process. :(
And I am really leary about using the actual executable directly
(although I will try that next), as the same executable is used for some
other server processes - and I don't necessarily want them all shutdown
when I try to shutdown the targetted one.
Regards,
Steve
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org
iD8DBQFHVfJXPtiPEDq7o8YRAisZAJ0doGVAzYUfBqT1+CL16q5sU6SoogCfcnkF
byv0oiJ8qOWD0+UOkP3AU60=
=bXY6
-----END PGP SIGNATURE-----
More information about the Discuss
mailing list