summaryrefslogtreecommitdiffstats
path: root/osdep/terminal-unix.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-04-26 22:52:26 +0200
committerwm4 <wm4@nowhere>2014-04-30 11:45:31 +0200
commitd9c3a51d877433a548c365fa144158d1c09bb6f3 (patch)
tree0e0fbb0f8d0b234ff9852c9659dfd6b2ec596263 /osdep/terminal-unix.c
parent619fa761af4f13b1ceb05876b4953f4afd554729 (diff)
downloadmpv-d9c3a51d877433a548c365fa144158d1c09bb6f3.tar.bz2
mpv-d9c3a51d877433a548c365fa144158d1c09bb6f3.tar.xz
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.
Diffstat (limited to 'osdep/terminal-unix.c')
-rw-r--r--osdep/terminal-unix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/osdep/terminal-unix.c b/osdep/terminal-unix.c
index 7bb01495b9..338ff677d1 100644
--- a/osdep/terminal-unix.c
+++ b/osdep/terminal-unix.c
@@ -518,7 +518,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);
}