public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Michael Tokarev <mjt@tls.msk.ru>
To: Al Viro <viro@ftp.linux.org.uk>
Cc: Denys Vlasenko <vda.linux@googlemail.com>,
	Davide Libenzi <davidel@xmailserver.org>,
	Ulrich Drepper <drepper@redhat.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: F_DUPFD_CLOEXEC implementation
Date: Mon, 01 Oct 2007 22:53:24 +0400	[thread overview]
Message-ID: <47014224.4030204@msgid.tls.msk.ru> (raw)
In-Reply-To: <20071001181648.GB8181@ftp.linux.org.uk>

Al Viro wrote:
> On Mon, Oct 01, 2007 at 11:07:15AM +0100, Denys Vlasenko wrote:
>> Also attached is ndelaytest.c which can be used to test that
>> send(MSG_DONTWAIT) indeed is failing with EAGAIN if write would block
>> and that other processes never see O_NONBLOCK set.
>>
>> Comments?
> 
> Never send patches during or approaching hangover?
> 	* it's on a bunch of cyclic lists.  Have its neighbor
> go away while you are doing all that crap => boom
> 	* there's that thing call current position...  It gets buggered.
> 	* overwriting it while another task might be in the middle of
> syscall involving it => boom
> 	* non-cooperative tasks reading *in* *parallel* from the same
> opened file are going to have a lot more serious problems than agreeing
> on O_NONBLOCK anyway, so I really don't understand what the hell is that for.

Good summary... ;)

But for the last part of the last item - sometimes, definitely more than
once, I wondered why there's no equivalent to recv(MSG_DONTWAIT) for
non-sockets -- why for sockets it's as simple as adding an option (a
single bit), while for all the rest it requires two fcntl calls...
Sometimes it's handy. ;)

Not that I'm arguing for or against such a feature anyway..

/mjt

  parent reply	other threads:[~2007-10-01 19:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-28 17:34 F_DUPFD_CLOEXEC implementation Ulrich Drepper
2007-09-28 18:19 ` Davide Libenzi
2007-09-28 18:23   ` Ulrich Drepper
2007-09-30  0:31 ` Denys Vlasenko
2007-09-30 23:11   ` Davide Libenzi
2007-09-30 23:58     ` Denys Vlasenko
2007-10-01  3:15       ` Davide Libenzi
2007-10-01 10:07         ` Denys Vlasenko
2007-10-01 18:16           ` Al Viro
2007-10-01 18:49             ` Denys Vlasenko
2007-10-01 19:04               ` Davide Libenzi
2007-10-02  9:28                 ` Denys Vlasenko
2007-10-02 19:52                   ` Davide Libenzi
2007-10-01 18:53             ` Michael Tokarev [this message]
2007-10-01  0:59   ` Miquel van Smoorenburg

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=47014224.4030204@msgid.tls.msk.ru \
    --to=mjt@tls.msk.ru \
    --cc=akpm@linux-foundation.org \
    --cc=davidel@xmailserver.org \
    --cc=drepper@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vda.linux@googlemail.com \
    --cc=viro@ftp.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