Date: Sun, 18 Sep 2011 14:54:34 +0300 From: Mikolaj Golub <trociny@freebsd.org> To: "Ronald Klop" <ronald-freebsd8@klop.yi.org> Cc: "freebsd-stable@freebsd.org" <freebsd-stable@freebsd.org>, Jeremy Chadwick <freebsd@jdc.parodius.com>, cperciva@freebsd.org Subject: Re: /usr/bin/script eating 100% cpu with portupgrade and xargs Message-ID: <868vpmdq11.fsf@kopusha.home.net> In-Reply-To: <op.v1z4ooot8527sy@pinky> (Ronald Klop's message of "Sun, 18 Sep 2011 13:25:26 %2B0200") References: <op.v1y8gdtf8527sy@pinky> <20110918045413.GA63773@DataIX.net> <20110918053901.GA31617@icarus.home.lan> <op.v1zrszht8527sy@pinky> <86d3eydsmf.fsf@kopusha.home.net> <op.v1z4ooot8527sy@pinky>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?868vpmdq11.fsf>