Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: open fails in daemon



I use a modified sample from Apple. <http://developer.apple.com/qa/qa2001/qa1133.html>

Yikes. Bad sample code. We shouldn't be recommending daemon()...

childPID = vfork();

You want to use fork() here instead. Any library calls besides _exit or one of the exec*() family of functions result in undefined behavior after vfork().

matt.
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: open fails in daemon (From: Christian Weykopf <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.