lkml.org 
[lkml]   [2006]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Strange Linux behaviour with blocking syscalls and stop signals+SIGCONT
Hi Manfred,

> Michael Kerrisk wrote:
>
> > c) The Linux baehviour has been arbitrary across kernel versions and
> > system calls. In particular, the following system calls showed this
> > behaviour in earlier kernel versions, but then the behaviour was
> > changed without forewarning and (AFAIK) without subsequent complaint:
> >
> > [snip]
> >
> > * msgsnd() and msgrcv() in kernels before 2.6.9.
> >
> That was my change - and I even forgot to mention it in the changelog
> (hiding in shame):
> I replaced -EINTR with -ERESTARTNOHAND.

Well, that change was useful for my argument: the change appears
to have affected no-one, and so why not make it also for futex(),
sigtimedwait(), semop()/semtimedop(), inotify read(),
epoll_wait()...

> That hides signals that are handled in the kernel from user space -
> probably what we want.

Yes.

> Michael: Could you replace the EINTR in inotify.c with ERESTARTNOHAND?
> That should prevent the kernel from showing the signal to user space.
> I'd guess that most instances of EINTR are wrong, except in device
> drivers: It means we return from the syscall, even if the signal handler
> wants to restart the system call.

I'll try patching a kernel to s/EINTR/ERESTARTNOHAND/ in relevant
places, and see how that goes. If it goes well, I'll submit a
patch.

Cheers,

Michael

--
Michael Kerrisk
maintainer of Linux man pages Sections 2, 3, 4, 5, and 7

Want to help with man page maintenance?
Grab the latest tarball at
ftp://ftp.win.tue.nl/pub/linux-local/manpages/,
read the HOWTOHELP file and grep the source
files for 'FIXME'.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-07-06 11:25    [W:0.106 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site