about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2018-09-19 17:24:31 +0200
committerLeah Neukirchen <leah@vuxu.org>2018-09-19 17:24:31 +0200
commit3c9a7c2fdcb4f6f11868271c776a7c4d453dc6ad (patch)
treeb2a30f7f1ac135f0fec46a79ebbc4439e45cfd0a
parent8e9bea214cac73a4fe033891a6e25338c12f3ecf (diff)
downloadextrace-3c9a7c2fdcb4f6f11868271c776a7c4d453dc6ad.tar.gz
extrace-3c9a7c2fdcb4f6f11868271c776a7c4d453dc6ad.tar.xz
extrace-3c9a7c2fdcb4f6f11868271c776a7c4d453dc6ad.zip
pwait: move installation of SIGINT signal handler just before the loop
-rw-r--r--pwait.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pwait.c b/pwait.c
index 842fe9a..bda13f8 100644
--- a/pwait.c
+++ b/pwait.c
@@ -237,8 +237,6 @@ usage:
 	if (*mcop_msg == PROC_CN_MCAST_IGNORE)
 		goto close_and_exit;
 
-	signal(SIGINT, sigint);
-
 	quit = 1;
 	for (n = 0; n < m; n++) {
 		errno = 0;
@@ -254,6 +252,8 @@ usage:
 	if (quit)
 		exit(1);
 
+	signal(SIGINT, sigint);
+
 	rc = 0;
 	while (!quit) {
 		memset(buff, 0, sizeof buff);