From: THIELL Stephane <stephane.thiell@cea.fr>
To: Davide Libenzi <davidel@xmailserver.org>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [patch/rfc] Make poll/select report error (POLLNVAL and EBADF) for unsupported files
Date: Wed, 17 Feb 2010 18:21:55 +0100 [thread overview]
Message-ID: <4B7C25B3.5010206@cea.fr> (raw)
In-Reply-To: <alpine.DEB.2.00.1002150945460.7390@makko.or.mcafeemobile.com>
> On Mon, 15 Feb 2010, Eric Dumazet wrote:
>
>
>> Hmm, according to POSIX :
>>
>> The poll() function shall support regular files, terminal and
>> pseudo-terminal devices, FIFOs, pipes, sockets ...
>>
>> Regular files shall always poll TRUE for reading and writing.
>>
>>
As POSIX says poll(2) have to support regular files (and it seems all
possible user file descriptors), then wouldn't it be better/more
coherent to have epoll(7) behave the same way (ie. support regular files
instead of epoll_ctl(2) returning EPERM), in order to allow generic code
handling both very common situations like:
$ cat replay_file | application
and
$ application < replay_file
...where for instance the application doesn't know the origine of its fd 0 (pipe, file, or something else).
Regards,
Stephane Thiell
next prev parent reply other threads:[~2010-02-17 18:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-14 22:27 Davide Libenzi
2010-02-15 17:42 ` Eric Dumazet
2010-02-15 17:47 ` Eric Dumazet
2010-02-15 17:50 ` Davide Libenzi
2010-02-17 17:21 ` THIELL Stephane [this message]
2010-02-17 18:16 ` Davide Libenzi
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=4B7C25B3.5010206@cea.fr \
--to=stephane.thiell@cea.fr \
--cc=akpm@linux-foundation.org \
--cc=davidel@xmailserver.org \
--cc=eric.dumazet@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®