The code looks pretty much typical, everything seems fine. But the
code fails on macosx - waitpid() returns ECHILD error. waitpid()
thinks that there is no any child with such pid. Hmm, why?
Although probably unrelated to the error you are getting, the above
code is not safe. You must use something like this instead:
int res;
do {
res = waitpid(pid, &status, 0);
} while ((res < 0) && (errno == EINTR));
There are many low level libc routines that directly map to syscalls
and which can return EINTR. In every such case you must use a loop
like the above, or at least correctly deal with the special case of
EINTR.
Jonas
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden