Re: Re: Strange Linux behaviour with blocking syscalls and stopsignals+SIGCONT

From: Michael Kerrisk
Date: Fri Jul 07 2006 - 00:28:40 EST


Von: Manfred Spraul <manfred@xxxxxxxxxxxxxxxx>
> Michael Kerrisk wrote:
>
> >
> >
> >>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.
> >
> >
> >
> 1) I would go further and try ERESTARTSYS: ERESTARTSYS means that the
> kernel signal handler honors SA_RESTART

Yes, this is a separate but related issue: some system calls
are not restarted by SA_RESTART. This set of system calls
overlaps with, but is not quite the same as, the set of
system calls that demonstrate the stop+SIGCONT ==> EINTR
strangeness. I thought to tackle the latter problem
first (since the fix seems easy), and then perhaps
get onto the other one later (it is more likely to
lead to visible ABI changes).

Cheers,

Michael
--


Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/