On Wed, 28 Sep 2011 16:56:32 +0200 Andi Kleen <a...@firstfloor.org> wrote:
> > I suppose we might get interrupted before anything is read and > > read can return with -1 (I suppose partial reads are quite unlikely > > though)? Thus, don't we need the usual EINTR loop? > > When we get interrupted gcc will die. I don't think gcc handles any > asynchronous signals, right? That depends upon the signal. If we got SIGCHLD or SIGWINCH, the call to read probably gets EINTR, but the signal is ignored unless explicitly handled. So I would suggest testing for EINTR. Besides, perhaps some plugins could install their signal handlers.... Regards. -- Basile STARYNKEVITCH http://starynkevitch.net/Basile/ email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359 8, rue de la Faiencerie, 92340 Bourg La Reine, France *** opinions {are only mine, sont seulement les miennes} ***