public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Michael Kerrisk <mtk.manpages@googlemail.com>
To: Ulrich Drepper <drepper@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Al Viro <viro@zeniv.linux.org.uk>,
	lkml <linux-kernel@vger.kernel.org>,
	Davide Libenzi <davidel@xmailserver.org>
Subject: No NONBLOCK flag for dup3() or epoll_create1()?
Date: Wed, 20 Aug 2008 18:49:29 +0200	[thread overview]
Message-ID: <48AC4B19.6000206@gmail.com> (raw)

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


             reply	other threads:[~2008-08-20 16:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-20 16:49 Michael Kerrisk [this message]
2008-08-24 19:35 ` No NONBLOCK flag for dup3() or epoll_create1()? 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48AC4B19.6000206@gmail.com \
    --to=mtk.manpages@googlemail.com \
    --cc=akpm@linux-foundation.org \
    --cc=davidel@xmailserver.org \
    --cc=drepper@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox