[lkml]   [2000]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Can EINTR be handled the way BSD handles it? -- a plea from a user-land programmer...
Ulrich Drepper wrote:
> writes:
> > 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.
> --
> ---------------. ,-. 1325 Chesapeake Terrace
> Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
> Red Hat `--' drepper at `------------------------

After reading about SA_RESTART, ok. However, couldn't those
applications that require it enable this behaviour explicitly?

The problem I'm having right now is with pthread_create() failing
because deep somewhere in either the kernel or glibc, nanosleep()
returns EINTR during said pthread_create() and pthread_create() fails.

I've got a multithreaded program written using gcc (2.95.2) and glibc
(2.1.3), and it's talking to a natively threaded Java program (tried
both Sun & Blackdown ports, both 1.2.2 and 1.3) on a 2.2.17 kernel. The
C program is listening for incoming socket connections, and the Java
program is hammering on it with many parallel connect() calls. After a
short, a bit random interval, pthread_create() will fail in either my
program, or deep in the Java VM. I assume that the Java VM is using

I don't mean to sound like a psycho on this, but I can't see why
SA_RESTART isn't the default behavior. Maybe I'm missing something
George T. Talbot
<george at moberg dot com>
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

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