lkml.org 
[lkml]   [2000]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Can EINTR be handled the way BSD handles it? -- a plea from a user-land programmer...
Date
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/

\
 
 \ /
  Last update: 2005-03-22 12:45    [W:0.059 / U:13.680 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site