[PATCH] Allow system call restarts upon signal interruption

Mark Kettenis mark.kettenis at xs4all.nl
Tue May 12 23:32:49 PDT 2015


> From: =?UTF-8?Q?Michel_D=c3=a4nzer?= <michel at daenzer.net>
> Date: Wed, 13 May 2015 11:18:45 +0900
> 
> On 13.05.2015 07:39, Daniel Drake wrote:
> > The X server frequently deals with SIGIO and SIGALRM interruptions.
> > If process execution is inside certain blocking system calls
> > when these signals arrive, e.g. with the kernel blocked on
> > a contended semaphore, the system calls will be interrupted.
> > 
> > Some system calls are automatically restartable (the kernel re-executes
> > them with the same parameters once the signal handler returns) but
> > only if the signal handler allows it.
> > 
> > Set SA_RESTART on the signal handlers to enable this convenient
> > behaviour.
> 
> The discussion about this on IRC sounded to me like we don't want to do
> this for both signals, because at least one of them should interrupt
> select(). My guess would be that SIGIO should interrupt select() and
> thus shouldn't use SA_RESTART.

Doesn't the "smart" scheduler rely on the interrupt behviour as well?


More information about the xorg-devel mailing list