lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	02 Feb 2007 10:59:42 -0800
From:	Philippe Troin <phil@...i.org>
To:	Roland Kuhn <rkuhn@....physik.tu-muenchen.de>
Cc:	"Guillaume Chazarain" <guichaz@...il.com>,
	"Denis Vlasenko" <vda.linux@...glemail.com>,
	linux-kernel@...r.kernel.org
Subject: Re: O_NONBLOCK setting "leak" outside of a process??

Roland Kuhn <rkuhn@....physik.tu-muenchen.de> writes:

> Hi Guillaume!
> 
> On 2 Feb 2007, at 14:48, Guillaume Chazarain wrote:
> 
> > 2007/2/2, Roland Kuhn <rkuhn@....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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ