[Asterisk-Users] Re: System called seems forked up
Bill Michaelson
bill at cosi.com
Sat Feb 21 07:41:52 MST 2004
>It is now indeed more discerning, but it has reported Fork failed. But
>the fork most certainly has not failed! The shell command invoked has
>run, and what's more, completed successfully, producing the expected files.
> Does anyone have any ideas?
andrewg at felinemenace.org suggested:
Can you check the errno? strerror(errno); should give you a string of why it
failed. (Just be careful not to use other stuff which touches errno after the
fork()
Of course - very good suggestion (embarrassed I didn't think of it)...
anyway...
it returns 10, which perror tells me is "No child processes".
Sooo, I suppose the spawned process is somehow disassociated from the
process group prior to execution of the wait() embedded within the
system()? Duuh... I'm still stumped, but I guess we are on to something?
On the other hand, if a fork does really fail, one might expect errno to
be 10 in that case too.
I've half a mind to break it out into a fork/exec/wait for myself, but,
uh, ugh. I guess I'm lazy. Please, briliant insights, anybody?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20040221/25f319c1/attachment.htm
More information about the asterisk-users
mailing list