On OS X 10.4/5/6:
I have a parent process which spawns a child. I want to kill the parent without killing the child. Is it possible? I can modify source on either app.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As NSD asked, it really depends on how it is spawned. If you are using a shell script, for example, you can use the
nohupcommand to run the child through.If you are using
fork/exec, then it is a little more complicated, but no too much so.From http://code.activestate.com/recipes/66012/
This is one of the best books ever written. It covers these topics in great and extensive detail.
Advanced Programming in the UNIX Environment, Second Edition (Addison-Wesley Professional Computing Series) (Paperback)
ISBN-10: 0321525949
ISBN-13: 978-0321525949
5 star amazon reviews (I’d give it 6).