public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* No NONBLOCK flag for dup3() or epoll_create1()?
@ 2008-08-20 16:49 Michael Kerrisk
  2008-08-24 19:35 ` Davide Libenzi
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Michael Kerrisk @ 2008-08-20 16:49 UTC (permalink / raw)
  To: Ulrich Drepper; +Cc: Andrew Morton, Al Viro, lkml, Davide Libenzi

Ulrich

I've been doing some testing (2.6.27-rc3) of your new
file-descriptor-creating syscalls that accept flags.  According to

http://udrepper.livejournal.com/20407.html

all of the system calls should accept a *_NONBLOCK flag.  All of them do,
except for two:
dup3(olfd, newfd, flags)
and
epoll_create1(flags).

For epoll_create1() this certainly appears to be an oversight, since I can't
think of a reason not to support *_NONBLOCK.

For dup3() it is perhaps also an oversight.  However, it's not really clear
to me whether supporting O_NONBLOCK makes sense, since that would change the
file status flags of the open file description that is (also) referred to by
oldfd.  (Furthermore, given a open file description for which O_NONBLOCK is
already enabled, it is not possible to make a dup3() call that disables
O_NONBLOCK, which is an odd asymmetry in the API.)  What are your thoughts on
this?

Cheers,

Michael


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-09-02  5:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-20 16:49 No NONBLOCK flag for dup3() or epoll_create1()? Michael Kerrisk
2008-08-24 19:35 ` Davide Libenzi
2008-08-29 20:44 ` Michael Kerrisk
2008-09-02  0:34 ` Ulrich Drepper
2008-09-02  5:06   ` Michael Kerrisk
2008-09-02  5:07   ` Michael Kerrisk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox