O_NONBLOCK on stdin left set by child (using ash shell)

Johns Daniel johns.daniel at gmail.com
Tue Nov 10 20:00:37 UTC 2009


On Tue, Nov 10, 2009 at 1:43 PM, Cathey, Jim <jcathey at ciena.com> wrote:
>>It seems to me that it would be bad design to have such an intent.
>>IOW, one app is changing the *parent shell* in order to pass a
>>non-standard state on to the next app.
>
> Things like stty(1) do this all the time.  Seems to me that
> it is up to any given program (such as a shell) to force I/O
> mode bits into any states that are required for it to work
> correctly, and they generally do this while leaving the rest
> of the bits alone (inherited).  Not sure how this (ancient)
> practice bears on the current problem.

I think the key here is that the shell should do what it takes to make
things work correctly.

The current problem is that the shell stops working correctly (if the
previous command leaves the shell in a bad state). Even if an app was
good enough to clean up after itself, we still don't cover the case
where the app crashes.

The alternative would be to fix nearly all apps that use stdin (cat, vi, etc)!

>
> -- Jim
>


More information about the busybox mailing list