From 3c9a7c2fdcb4f6f11868271c776a7c4d453dc6ad Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Wed, 19 Sep 2018 17:24:31 +0200 Subject: pwait: move installation of SIGINT signal handler just before the loop --- pwait.c | 4 ++-- 1 file 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); -- cgit 1.4.1