On Wed, Aug 29, 2012 at 1:36 PM, Shripad K <[email protected]> wrote:
> Ngninx/Stud fork()s and the child runs the event loop; the parent just does
> a bind(). Since stud uses libev you can also look at the implementation in
> stud:
>
> https://github.com/bumptech/stud/blob/master/stud.c#L1822
> https://github.com/bumptech/stud/blob/master/stud.c#L1853
> https://github.com/bumptech/stud/blob/master/stud.c#L1613
> https://github.com/bumptech/stud/blob/master/stud.c#L1515

That won't work with libuv out of the box, it marks all file
descriptors as close-on-exec to avoid leaking file descriptors to
child processes.

A quick workaround is to mark the file descriptor as inheritable again
with fcntl(stream->fd, F_SETFD, 0). (But note that fd is a private
field and may be renamed or removed in the future.)

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to