summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2014-08-06 22:53:16 +0200
committerAllan McRae <allan@archlinux.org>2014-09-23 13:43:16 +0200
commit24e0bd215c3afc5b0a80f6e292561b237acb19e0 (patch)
tree43d3b29a555a9dbb02a67170b45b1ba281bdf56b /src
parentc792262b137a5f2daddac22f82e7d8d98d0d7d31 (diff)
downloadpacman-24e0bd215c3afc5b0a80f6e292561b237acb19e0.tar.gz
pacman-24e0bd215c3afc5b0a80f6e292561b237acb19e0.tar.xz
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 <andrew.gregory.8@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/pacman/pacman.c2
1 files changed, 1 insertions, 1 deletions
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++) {