##// END OF EJS Templates
chg: document why we send SIGHUP and SIGINT to process group...
Jun Wu -
r31229:68c94f28 default
parent child Browse files
Show More
@@ -91,11 +91,15 b' void setupsignalhandler(pid_t pid, pid_t'
91 91
92 92 struct sigaction sa;
93 93 memset(&sa, 0, sizeof(sa));
94
95 /* deadly signals meant to be sent to a process group:
96 * - SIGHUP: usually generated by the kernel, when termination of a
97 * process causes that process group to become orphaned
98 * - SIGINT: usually generated by the terminal */
94 99 sa.sa_handler = forwardsignaltogroup;
95 100 sa.sa_flags = SA_RESTART;
96 101 if (sigemptyset(&sa.sa_mask) < 0)
97 102 goto error;
98
99 103 if (sigaction(SIGHUP, &sa, NULL) < 0)
100 104 goto error;
101 105 if (sigaction(SIGINT, &sa, NULL) < 0)
General Comments 0
You need to be logged in to leave comments. Login now