[linux-dvb] ERESTARTSYS usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



l?rdag 06 august 2005, 21:15, skrev Johannes Stezenbach:
> 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).

I didn't know this, thanks a lot.

Kenneth



[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux