Re: continuing after fork() (Re: Problems with NSTimer and NSRunLoop/CFRunLoop)
Re: continuing after fork() (Re: Problems with NSTimer and NSRunLoop/CFRunLoop)
- Subject: Re: continuing after fork() (Re: Problems with NSTimer and NSRunLoop/CFRunLoop)
- From: Kaelin Colclasure <email@hidden>
- Date: Thu, 13 Jan 2005 11:19:12 -0800
On Jan 12, 2005, at 10:56 PM, Mont Rothstein wrote:
Thank you Chris for the detailed and informative reply, this problem
has been haunting me for some time.
If you don't mind I'd like to clarify my interpretation of your
response to make sure I have a handle on this.
First, since my last post I have determined that certain frameworks I
was including cause my child to fail. Without those frameworks the
child runs fine.
If I understand you correctly then the fact that without those
frameworks the child works is luck, because in both cases the app
links against Apple frameworks. I was headed down a path of
attempting to remove the dependency on the problem frameworks (my
previous removal was only a test and was at the expense of
functionality). Given your description I believe I should abandon
that course and instead use execve() because even the working version
is at risk of failing.
Also, I am unclear from the man page on execve(). Will my parent
process still receive the exit from the child?
Yes.
And it sounds like I need a second main() with (argc, argv, envp) that
will be called by execve().
main() is like the Highlander -- there can be only one. :-) Typically
what is done is a "special" argument (e.g. -daemon, -child, etc.) is
used to tell the new invocation that it is running as a child.
-- Kaelin
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden