mirror of https://github.com/mpv-player/mpv
terminal: always use SA_RESTART with sigaction()
One problem is that for example stdio functions won't restart syscalls manually, and instead treat EINTR as an error. So passing SA_RESTART is the only sane thing to do, unless you have special requirements, which we don't.
This commit is contained in:
parent
eb3cc32f9b
commit
cdafc2f7d7
|
@ -532,7 +532,7 @@ static int setsigaction(int signo, void (*handler) (int),
|
|||
else
|
||||
sigemptyset(&sa.sa_mask);
|
||||
|
||||
sa.sa_flags = flags;
|
||||
sa.sa_flags = flags | SA_RESTART;
|
||||
return sigaction(signo, &sa, NULL);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue