diff --git a/contrib/chg/chg.c b/contrib/chg/chg.c index 85a18f3c0bddb989ba9f93eb85470c5d479703e9_Y29udHJpYi9jaGcvY2hnLmM=..3ddf4d0c41702904a4966edba78765582f35bea5_Y29udHJpYi9jaGcvY2hnLmM= 100644 --- a/contrib/chg/chg.c +++ b/contrib/chg/chg.c @@ -434,8 +434,6 @@ if (sigaction(SIGHUP, &sa, NULL) < 0) goto error; - if (sigaction(SIGINT, &sa, NULL) < 0) - goto error; if (sigaction(SIGTERM, &sa, NULL) < 0) goto error; if (sigaction(SIGWINCH, &sa, NULL) < 0) @@ -445,6 +443,11 @@ if (sigaction(SIGTSTP, &sa, NULL) < 0) goto error; + /* ignore Ctrl+C while shutting down to make pager exits cleanly */ + sa.sa_handler = SIG_IGN; + if (sigaction(SIGINT, &sa, NULL) < 0) + goto error; + peerpid = 0; return;