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
Date
Followup to:  <3A031591.EA24ABFA@moberg.com>
By author: george@moberg.com
In newsgroup: linux.dev.kernel
>
> Thanks for the info.
>
> After looking at it, let me modify my position a bit.
>
> My problem is that pthread_create (glibc 2.1.3, kernel 2.2.17 i686) is
> failing because, deep inside glibc somewhere, nanosleep() is returning
> EINTR.
>
> My code is not using signals. The threading library is, and there is
> obviously some subtle bug going on here. Ever wonder why when browsing
> with Netscape and you click on a link and it says "Interrupted system
> call."? This is it. I'm arguing that the default behaviour should be
> SA_RESTART, and if some programmer is so studly that they actually know
> what the hell they are doing by disabling SA_RESTART, then they can do
> it explicitly.
>

They do so explicitly by not specifying SA_RESTART. It's a bitmask,
and the behaviour of each bit is specified by POSIX.

> I don't mean this to sound like a rant.

It does... it sounds like a rant someone who hasn't even bothered
looking up the relevant standards and interfaced.

> It's just that I can't possibly ascertain why someone in their right
> mind would want any behaviour different than SA_RESTART.

Synchronous post-processing of signals. Too many things cannot be
safely done in a signal handler context.

-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.044 / U:1.928 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site