[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ERESTARTNOHAND
On Friday 28 February 2003 11:23, you wrote:
> On Thu, Feb 27, 2003 at 11:43:08AM -0800, Seth Arnold wrote:
> > On Thu, Feb 27, 2003 at 08:30:50PM +0100, Frank A. Uepping wrote:
> > > > #define ERESTARTNOHAND 514 /* restart if no handler.. */
> > >
> > > What handler (signal handler)?
> >
> > Yes; BSD introduced restartable systemcalls around 1985 or so; if the
> > system call was interrupted by a signal, rather than simply returning
> > EINTR, it would try to restart the system call for the process.
> >
> > I suggest checking out W Richard Stevens's absolutely wonderful book,
> > Advanced Programming in the Unix Environment. It is well worth its cost.
>
> ... the syscall is restarted if:
>
> - It returns -ERESTARTSYS and the signal handler did not exit via
> a longjump or terminate the process.
> - It returns -ERESTARTNOHAND and the signal is ignored. It should set
> errno EINTR if it is handled since ERESTARTNOHAND is only defined in
> kernel.
>
>---- Jan 'Bulb' Hudec <bulb@ucw.cz>
That is -ERESTARTNOHAND makes that the SA_RESTART flag
is ignored (when there is a sig handler).
Thus someone should use this in a file_operations::poll() when a
signal arrives here, because select() is never subject to restarting, right?
/FAU
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/