bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: About SOCK_CLOEXEC, SOCK_NONBLOCK flags, accept4, etc.


From: Roland McGrath
Subject: Re: About SOCK_CLOEXEC, SOCK_NONBLOCK flags, accept4, etc.
Date: Wed, 10 Dec 2008 00:37:26 -0800 (PST)

accept4.c should define __accept4, move the accept.c guts there, accept
should just call __accept4 with 0 flags.

CLOEXEC is purely in libc, just pass O_CLOEXEC to _hurd_intern_fd.

O_NONBLOCK can be set normally (io_set_openmodes) on the socket
before installing it in the fd.  That is the intent: that at no
time does the fd exist but without O_NONBLOCK set.

The whole body should indeed be inside HURD_CRITICAL_BEGIN anyway.
But that's just for signal safety.  It doesn't have anything to do
with a window without O_NONBLOCK, since that window would be for
the port that is not yet installed into an fd.


Thanks,
Roland




reply via email to

[Prev in Thread] Current Thread [Next in Thread]