From d9c3a51d877433a548c365fa144158d1c09bb6f3 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 26 Apr 2014 22:52:26 +0200 Subject: [PATCH] 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. --- osdep/terminal-unix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }