On Thursday 18 August 2011 07:34, Laurent Bercot wrote:
> > It doesn't; it can't. Hence my ranting. A 100% safe
> > 100% orthogonal, useful easy-to-use AIO mechanism should
> > have been designed
>
> Would the hypothetical nonblock_read() and nonblock_write() system
> calls suggested at http://cr.yp.to/unix/nonblock.html be a good
> enough design, or do you think something more is needed ?
Yes. But this requires new syscalls. And we might need more flags
(such as "don't generate SIGPIPE"), so the new syscalls should be
read2(fd, buf, len, flags)
write2(fd, buf, len, flags)
where flags is a bitfield with bits "don't block", "don't SIGPIPE",
and at this point - BOOM - you are realizing we already have them! -
recv(fd, buf, len, flags)
send(fd, buf, len, flags)
and even needed flags already exist too: MSG_DONTWAIT, MSG_NOSIGNAL.
That's why I propose we don't multiply syscalls, but extend existing
socket I/O ops to work on non-sockets.
--
vda
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox