On Mon, Aug 4, 2008 at 2:15 AM, Steve Cronin <[EMAIL PROTECTED]> wrote: > I have 4 questions > 1) Given that it is higher-level than necessary, I would still appreciate > understanding why it doesn't work.
Race conditions, waiting on the child task to complete, reliance on shell parsing semantics... there are plenty of reasons why your original solution could fail. > 2) In the script you cited, I don't understand the 'if(fork() || fork())' > conditional test. Can you clarify this statement? fork returns 0 in the child, which forces the short-circuit or test to evaluate its right hand side. Then, in the child, the if test will fail becuase this fork will also return zero. It's a shorthand way to create a grandchild processes. > 3) Why are you using 'execl' and not 'exec'? There is no function called exec. `man 3 exec` brings up the manpage for the exec family of functions... notice there's no exec function actually listed. --Kyle Sluder _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]