Re: Debugging __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__
Re: Debugging __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__
- Subject: Re: Debugging __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__
- From: Tommy Nordgren <email@hidden>
- Date: Thu, 10 Apr 2008 20:46:45 +0200
On 8 apr 2008, at 23.07, Robert Tillyard wrote:
I've had a fair amount of problems with this from code that has
worked for years under traditional UNIX implementations.
It appears that if a system call that you make after a fork() calls
any Core Foundation function you get this error. We were using a
double fork() to separate from the parent process and provide a
status back to waitpid() to indicate that the program ran
successfully but the first call to XOpenDisplay() causes this error.
We've had to make a different mechanism to spawn background
processes now where they call a binary that runs the process then
exits.
Not sure if this means that other UNIX systems break some kind of
POSIX rule or if Darwin does but this has caused a problem in
porting from UNIX to Darwin.
Regards, Rob.
Much of the communication between processes on Mac OS X (including
between GUI APPs and the Window Server), is handled by
Mach ports. Well, Mach ports get CLOSED on a fork. This is the that
some functionality is not available in the child after a fork.
For more info, check out Mark Dalrymple and Aaron Hillegass book
'Advanced Mac OS X Programming'
On 8 Apr 2008, at 18:57, Jerry wrote:
We're getting a load of messages of the form:
Break on
__THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__
() to debug.
The process has forked and you cannot use this CoreFoundation
functionality safely. You MUST exec().
from a thirdparty library we're using. The trouble is, when run
under gdb, the messages go away, and my breakpoint isn't hit. How
can I debug this and find out what's being called?
Thanks,
Jerry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
------
What is a woman that you forsake her, and the hearth fire and the home
acre,
to go with the old grey Widow Maker. --Kipling, harp song of the Dane
women
Tommy Nordgren
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden