Re: Can EINTR be handled the way BSD handles it? -- a plea from a user-land programmer...

From: H. Peter Anvin (hpa@zytor.com)
Date: Fri Nov 03 2000 - 16:24:10 EST


Followup to: <200011031951.WAA10871@ms2.inr.ac.ru>
By author: kuznet@ms2.inr.ac.ru
In newsgroup: linux.dev.kernel
>
> Hello!
>
> > > Can we _PLEASE_PLEASE_PLEASE_ not do this anymore and have the kernel do
> > > what BSD does: re-start the interrupted call?
> >
> > This is crap. Returning EINTR is necessary for many applications.
>
> Just reminder: this "crap" is default behaviour of Linux nowadays. 8)8)
>

signal() is crap... I personally think it was a major lose to have
signal() change to BSD behaviour by default (an unexpected change for
most applications!!)

For sigaction() you must choose behaviour explicitly anyway, by either
specifying or not specifying SA_RESTART.

Applications should use sigaction(). Period. Full stop. signal() is
so unpredictable these days as to be practically unusable.

        -hpa

-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Nov 07 2000 - 21:00:14 EST