[PATCH] allow send/recv(MSG_DONTWAIT) on non-sockets

2007-08-25 Thread Denys Vlasenko
Hello list, This patch attempts to make it possible to do a nonblocking read or write of fd's pointing to possibly shared struct file's in a non-racy manner, i.e. without using fcntl. One use case is when you want to read standard input, but don't want to switch fd 0 to O_NONBLOCK mode: if you ge

[PATCH] allow send/recv(MSG_DONTWAIT) on non-sockets (was Re: O_NONBLOCK is broken)

2007-08-19 Thread Denys Vlasenko
On Tuesday 14 August 2007 13:33, Alan Cox wrote: > > b) Make recv(fd, buf, size, flags) and send(fd, buf, size, flags); > >work with non-socket fds too, for flags==0 or flags==MSG_DONTWAIT. > >(it's ok to fail with "socket op on non-socket fd" for other values > >of flags) > > I think t