Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>In general, you need to <code>exec()</code> after <code>fork()</code> on Mac OS X.</p> <p>From the <a href="http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man2/fork.2.html" rel="nofollow"><code>fork(2)</code></a> man page:</p> <blockquote> <p>There are limits to what you can do in the child process. To be totally safe you should restrict your-self to only executing async-signal safe operations until such time as one of the exec functions is called. All APIs, including global data symbols, in any framework or library should be assumed to be unsafe after a fork() unless explicitly documented to be safe or async-signal safe. If you need to use these frameworks in the child process, you must exec. In this situation it is reasonable to exec yourself.</p> </blockquote> <p><a href="http://developer.apple.com/library/mac/#technotes/tn2005/tn2083.html" rel="nofollow">TN2083</a> also comments on this subject:</p> <blockquote> <p>Many Mac OS X frameworks do not work reliably if you call <code>fork</code> but do not call <code>exec</code>. The only exception is the System framework and, even there, the POSIX standard places severe constraints on what you can do between a <code>fork</code> and an <code>exec.</code></p> <p><strong>IMPORTANT:</strong> In fact, in Mac OS X 10.5 and later, Core Foundation will detect this situation and print the warning message shown in Listing 13.</p> <p><strong>Listing 13:</strong> Core Foundation complaining about fork-without-exec</p> <p>The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec(). Break on <code>__THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__()</code> to debug.</p> </blockquote>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload