This is a strange issue that we have run into already.
CoreFoundation has a number of functions that cannot be used after calling fork(). These functions can only be safely used if the program calls an exec() after the fork(). Unfortunately, when the daemon calls fork() to create a child, it can't call exec() itself, leaving it in a state that is unable to use CoreFoundation functions.
See
http://developer.apple.com/releasenotes/CoreFoundation/CoreFoundation.html under the header "CoreFoundation and fork()" for a little more information.
The result of this is that, because the daemon we have uses CoreFoundation, we can't use fork() to create child processes.
I'm trying to determine if there is a way to create background script processes without fork/exec for this reason. Otherwise, we will have to redesign the architecture to separate the Unix-based code from the OSX-based code to allow us to use fork/exec correctly.
Hopefully, this explanation is sufficient.