On Tue, Nov 10, 2009 at 5:43 PM, Johns Daniel <[email protected]> wrote: > We just upgraded to BusyBox v1.14.4 (w/ built-in ash shell),
...where ash got a workaround to not require O_NONBLOCK to be cleared on stdin (it used to reset it)... > and we > have noticed what seems to be a bug. Yes, this is a design bug *in Unix API*. O_NONBLOCK had to be a flag associated with a file descriptor, not a file, like FD_CLOEXEC. Or it should be possible to use recv(fd, buf, size, MSG_DONTWAIT) on non-sockets. > When we exit from one of our user apps that sets stdin to O_NONBLOCK, > O_NONBLOCK remains set on stdin in the shell. So, any subsequent app > not expecting O_NONBLOCK on stdin gets an unexpected EAGAIN. For > example, How ash can know that it was not your *intention* to switch O_NONBLOCK ob by one app and use it by other app? -- vda _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
