From: Philippe Troin <phil@fifi.org>
To: Roland Kuhn <rkuhn@e18.physik.tu-muenchen.de>
Cc: "Guillaume Chazarain" <guichaz@gmail.com>,
"Denis Vlasenko" <vda.linux@googlemail.com>,
linux-kernel@vger.kernel.org
Subject: Re: O_NONBLOCK setting "leak" outside of a process??
Date: 02 Feb 2007 10:59:42 -0800 [thread overview]
Message-ID: <87bqkc9yht.fsf@tantale.fifi.org> (raw)
In-Reply-To: <24DAE20A-F4CC-4A8F-902A-2A73D0DA2EB1@e18.physik.tu-muenchen.de>
Roland Kuhn <rkuhn@e18.physik.tu-muenchen.de> writes:
> Hi Guillaume!
>
> On 2 Feb 2007, at 14:48, Guillaume Chazarain wrote:
>
> > 2007/2/2, Roland Kuhn <rkuhn@e18.physik.tu-muenchen.de>:
> >
> >> That's a bug, right?
> >
> > No, if you want something like: (echo toto; date; echo titi) > file
> > to work in your shell, you'll be happy to have the seek position
> > shared in the processes.
Absolutely right. This has been part of Unix since the beginning.
> As a naive user I'd probably expect that each of the above adds to
> the output, which perfectly fits the O_APPEND flag (to be set by the
> shell, of course).
No, no, O_APPEND has slightly different semantics.
> The immediate point was about the flags, though, and having
> O_NONBLOCK on or off certainly is a _design_ choice when writing a
> program. If I remove O_NONBLOCK, I have a right to expect that I/O
> functions do not return EAGAIN!
Generally you don't want to mess with shared resouces like stdin,
stdout and stderr.
Phil.
next prev parent reply other threads:[~2007-02-02 19:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-27 20:52 O_NONBLOCK setting "leak" outside of a process?? Denis Vlasenko
2007-01-30 3:40 ` Philippe Troin
2007-02-01 23:00 ` Denis Vlasenko
2007-02-01 23:15 ` Philippe Troin
2007-02-02 12:10 ` Roland Kuhn
2007-02-02 13:48 ` Guillaume Chazarain
2007-02-02 15:04 ` Roland Kuhn
2007-02-02 18:59 ` Philippe Troin [this message]
2007-02-05 10:49 ` bert hubert
2007-02-04 0:55 ` David Schwartz
2007-02-04 1:22 ` Denis Vlasenko
2007-02-04 7:56 ` David Schwartz
2007-02-04 20:11 ` Michael Tokarev
2007-02-04 21:08 ` David Schwartz
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=87bqkc9yht.fsf@tantale.fifi.org \
--to=phil@fifi.org \
--cc=guichaz@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rkuhn@e18.physik.tu-muenchen.de \
--cc=vda.linux@googlemail.com \
/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