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
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
2) At least for the futex functions, it won't be as easy as replacing
EINTR wiht ERESTARTSYS: the futex functions receive a timeout a the
parameter, with the duration of the wait call as a parameter. You must
use ERESTART_RESTARTBLOCK.

--
Manfred
-
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 20:45    [W:0.062 / U:0.588 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site