From 02533d1a602fd1441836bc7df12a3a0a96c806de Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 27 Sep 2011 21:21:48 -0700 Subject: [PATCH] 2011-09-27 Paul Eggert * src/tar.c (stat_on_signal): Use SA_RESTART if available. --- src/tar.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tar.c b/src/tar.c index 6d37044..f0d8f5b 100644 --- a/src/tar.c +++ b/src/tar.c @@ -956,10 +956,13 @@ static void stat_on_signal (int signo) { #ifdef HAVE_SIGACTION +# ifndef SA_RESTART +# define SA_RESTART 0 +# endif struct sigaction act; act.sa_handler = sigstat; sigemptyset (&act.sa_mask); - act.sa_flags = 0; + act.sa_flags = SA_RESTART; sigaction (signo, &act, NULL); #else signal (signo, sigstat); -- 2.45.2