Re: Slightly OT: SIGKILL (force quit) and child process termination
Re: Slightly OT: SIGKILL (force quit) and child process termination
- Subject: Re: Slightly OT: SIGKILL (force quit) and child process termination
- From: "stephen joseph butler" <email@hidden>
- Date: Tue, 28 Nov 2006 10:36:12 -0600
2006/11/28, Guy Meyer <email@hidden>:
My application uses a child process, which is launched by NSTask.
If the parent process is sent a SIGKILL the child process is left
orphaned and continues to run, while I am interested in termination.
One solution to the problem is to implement a periodic IPC between
the processes. Another is to regularly check parent pid existence. I
am not interested in these solutions.
...
Obviously, as SIGKILL is none catchable the SIGKILL is also being
sent by the Kernel to the child processes.
How can I achieve same behavior ?
a) You should not be regularly sending SIGKILL to your process. And in
the rare event that you do have to, getting odd behavior (like child
processes continuing to run) isn't unexpected.
b) I'm guessing that in Terminal's case, the child processes get
SIGPIPE because they lose their STDIN/STDOUT.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden