On Wed, Nov 11, 2009 at 08:00:30PM +0100, Denys Vlasenko wrote: > > Applications which need to do nonblocking reads need to: > (1) try to obtain a non-shared fd; or > (2) clean up after themself; or > (3) switch O_NONBLOCK on/off momentarily before/after read; or > (4) use some other way (poll()? read() interrupted by ALRM?); > * and in any case * > (5) bug standard committees and/or Linux kernel people > to fix the damn mess
IMHO the shell cannot rely on apps doing the cleaning up, it should be able to deal with buggy apps, or apps killed by some signal etc. In the interest of compatibility, wouldn't it be best to find out what other shells do and do the same? I think for such corner cases it is better to adhere to UNIX tradition than on standards documents. (But in case you wonder, this particular case is not important enough for me to actually do the research.) Also, a general purpose toolkit like busybox should also work on old kernels (and perhaps even non-Linux kernels)? Thus a hypothetical kernel fix would buy you nothing. Johannes _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
