[PATCH] ash: clear NONBLOCK flag from stdin when in foreground

Rich Felker dalias at aerifal.cx
Thu Aug 18 13:27:22 UTC 2011


On Thu, Aug 18, 2011 at 08:04:27AM +0200, Laurent Bercot wrote:
> > Nobody "decided" to accept/include gets. What was decided is the
> > general principle that POSIX is a superset of ISO/IEC 9899:1999, and
> > that in any areas where the two conflict, the conflict is
> > unintentional and the latter (C) overrides. This is very sane.
> 
>  Very sane ?
>  A mechanism that perpetuates gigantic security holes from one
> standard to another does not strike me as "very sane". It strikes
> me as "what the heck, let's be lazy and favor simplicity of the
> procedure over quality of the result".

This argument is nonsense. Removing gets from the standard would do
nothing to remove it from implementations or from incompetent CS
professors' syllabi. Just look at all the other crap like sbrk that's
also extremely dangerous but still widely available.

> well do what you want. If your deviation from the standard is justified,
> people will understand why you did it, and may even approve.

May being the key word. Others won't approve. More splintering. More
hell for application writers. No thanks.

When there are flaws in a standard, you introduce minimally-intrusive
new interfaces for applications to get better behavior. Think of
nanosleep and clock_nanosleep replacing the poorly-specified usleep,
or the new O_CLOEXEC flag to open to avoid races. You don't go
ignoring the existing standard. Imagine how bad it would be if the
close-on-exec setting race had been fixed by changing the default to
close-on-exec...

Rich


More information about the busybox mailing list