Re: POSIX compatibility?

Andreas Schwab (
Wed, 11 Dec 96 14:32:40 +0100

Harald Koenig <> writes:

|>> Tracing a program changes the behaviour of interruptable syscalls. This
|>> should be fixed in the kernel sometime, but it is difficult because the
|>> context of the interrupted syscall is lost after the debugger has been
|>> called. I tried to get it right in Linux/m68k, but i didn't succeed. The
|>> GDB testsuite is a good place to find the difficult parts.
|>> So actually read() does return EINTR, but only when not tracing.

|> Ulrich's program doesn't return from read() even when not run with strace.
|> I've tested it with Linux 2.0.26 for both Intel (a.out and Elf) and DEC ALpha.

This is a different issue: libio (fgetc) always restarts read() after
EINTR. But that's exactly what is desired, isn't it? Otherwise the test
program would not exit with zero (result = ch == EOF && errno == EINTR).