Kenneth Aafl?y wrote: > Under linux/include/linux/errno.h there is a comment about ERESTARTSYS > and other errno values, that specifically states that those are not > to be seen by userspace programs. > > However, this value is frequently returned as the return value from > down_interruptible. This even though include/asm-i386 and some other > include/asm-*'s say that it returns -EINTR, which makes sense, since > the only thing that can innterupt it is a signal. > > Would you say that it would be okay to replace all ERESTARTSYS with EINTR? No. The VFS layer handles ERESTARTSYS and, depending on the SA_RESTART flag (see sigaction(2)) either restarts the syscall or returns EINTR to userspace. (The code that actually does this is in linux/arch/i386/kernel/signal.c). Johannes