From 24e0bd215c3afc5b0a80f6e292561b237acb19e0 Mon Sep 17 00:00:00 2001 From: Andrew Gregory Date: Wed, 6 Aug 2014 16:53:16 -0400 Subject: pacman: set SA_RESTART for signal handler Calling a signal handler interrupts some functions, most notably read() and therefore fgets(). Signed-off-by: Andrew Gregory --- src/pacman/pacman.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index 345fb0a3..7228d1c9 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -1029,7 +1029,7 @@ int main(int argc, char *argv[]) /* Set up the structure to specify the new action. */ new_action.sa_handler = handler; sigemptyset(&new_action.sa_mask); - new_action.sa_flags = 0; + new_action.sa_flags = SA_RESTART; /* assign our handler to any signals we care about */ for(i = 0; i < sizeof(signals) / sizeof(signals[0]); i++) { -- cgit v1.2.3-70-g09d2