in reply to Re: forking script hangs
in thread forking script hangs

... and fork lacks an error check, too.

(Yes, fork can fail. POSIX documents EAGAIN (temporary lack of resources or resource limits exceeded) and ENOMEM (out of memory). Linux also documents ENOSYS (not supported, e.g. on MMU-less hardware). The *BSDs follow POSIX.)

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Replies are listed 'Best First'.
Re^3: forking script hangs
by trippledubs (Deacon) on Jun 11, 2015 at 04:33 UTC
    ahh I was thinking incorrectly the parent should stop blocking when no more messages in the pipe sort of like when you read a socket. Thanks for clarifying and links.