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

Laurent Bercot ska-dietlibc at skarnet.org
Sun Aug 21 05:34:04 UTC 2011


> ERRORS
> 
> The recv() function shall fail if:
> 
> [ENOTSOCK]
> The socket argument does not refer to a socket.

 Is there any code that relies on this ? i.e. code that tests whether
a fd is a socket by recv()ing on it and testing the error code, if any.
 Such code would be very wrong anyway, but theoretically correct, so if,
say, a mainstream piece of software broke if recv() started working on
non-sockets, then there would be a serious case against the change.

 As it stands, Linux has deviated from the standard before, especially
about syscall application domains and error codes. I have seen close()
return EINVAL for instance.

-- 
 Laurent


More information about the busybox mailing list