/usr/bin/script eating 100% cpu with portupgrade and xargs

Mikolaj Golub trociny at freebsd.org
Sun Sep 18 11:54:39 UTC 2011


On Sun, 18 Sep 2011 13:25:26 +0200 Ronald Klop wrote:

 RK> It is a while since I programmed C, but why will writing 0 bytes give
 RK> the reader an end-of-file? Shouldn't the fd be closed to indicate
 RK> end-of-file?

AFAIR, this trick with writing 0 to emulate EOF because we can't close the fd
-- we still want to read from it.  Poor shutdown(2) for non-socket :-).

Colin might tell more...

-- 
Mikolaj Golub


More information about the freebsd-stable mailing list