Re: O_NONBLOCK is broken
- From: Alan Cox <alan@xxxxxxxxxxxxxxxxxxx>
- Date: Tue, 14 Aug 2007 13:33:19 +0100
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 that makes a lot of sense, and to be honest other MSG_ flags make
useful sense and have meaningful semantics that might be helpful
elsewhere if ever coded that way.
If you want to do this the first job is going to be to sort out the way
non-block is propogated to device driver read/write handlers. At the
moment they all check filp->f_flags
Alan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- [PATCH] allow send/recv(MSG_DONTWAIT) on non-sockets (was Re: O_NONBLOCK is broken)
- From: Denys Vlasenko
- Re: O_NONBLOCK is broken
- From: Jan Engelhardt
- [PATCH] allow send/recv(MSG_DONTWAIT) on non-sockets (was Re: O_NONBLOCK is broken)
- References:
- O_NONBLOCK is broken
- From: Denys Vlasenko
- O_NONBLOCK is broken
- Prev by Date: RV: ppdev - libieee1284.so conflicts with 2.6.2{0,1,2}
- Next by Date: Re: Linux 2.6.23-rc3
- Previous by thread: O_NONBLOCK is broken
- Next by thread: Re: O_NONBLOCK is broken
- Index(es):
Relevant Pages
|