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

Date: Fri Nov 03 2000 - 14:49:37 EST

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

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