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
619fa761af
commit
d9c3a51d87
|
@ -518,7 +518,7 @@ static int setsigaction(int signo, void (*handler) (int),
|
||||||
else
|
else
|
||||||
sigemptyset(&sa.sa_mask);
|
sigemptyset(&sa.sa_mask);
|
||||||
|
|
||||||
sa.sa_flags = flags;
|
sa.sa_flags = flags | SA_RESTART;
|
||||||
return sigaction(signo, &sa, NULL);
|
return sigaction(signo, &sa, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue