On Thursday 27 March 2008 14:40, Michele Sanges wrote: > > From one POV, it's useful behaviour (you do not need to preserve open > > fd > > on input side), OTOH eating CPU like crazy is not polite too :) > > The solution might be to close/open output side (open will block > > until there is a writer). > > The pipe was opened without the O_NONBLOCK option, so the 'read' call > was blocking, I don't think it was in loop.
O_NONBLOCK does not matter one iota if you reached EOF. read() will return 0 immediately, it will not block. Your code is hogging CPU, since your read() sits in a while (1) loop. -- vda _______________________________________________ busybox mailing list [email protected] http://busybox.net/cgi-bin/mailman/listinfo/busybox
