No, the kernel handles -ERESTARTSYS, but when you _strace_ a process you
see it being done, because strace sees the system call restart (and if you
think about it, strace _has_ to see that the system call will be
restarted, otherwise you wouldn't be able to follow what happened).
>
> > alarm(2) = 0
> > open("/dev/ttyS1", O_RDWR|O_NOCTTY) = -1 ERESTARTSYS (errno 512)
>
> This blocks for carrier
And note that the user space process never sees the ERESTARTSYS at all,
because the system call will be restarted (duh!) after the signal handler
returns, so it will eventually return some other error..
(In this case, the process does an "exit()", so the system call never will
return, of course, but the fact that user space never sees the ERESTARTSYS
is still true. It can be a bit surprising if you aren't used to reading
the strace output)
Linus