Browse code

supressed kill(0,TERM) if grandchildren died

Jiri Kuthan authored on 16/08/2002 13:21:37
Showing 1 changed files
... ...
@@ -426,6 +426,13 @@ void handle_sigs()
426 426
 								" signal %d\n", chld,
427 427
 								 WSTOPSIG(chld_status));
428 428
 			}
429
+#ifndef STOP_JIRIS_CHANGES
430
+			if (dont_fork) {
431
+				LOG(L_INFO, "INFO: dont_fork turned on, living on\n");
432
+				break;
433
+			} 
434
+			LOG(L_INFO, "INFO: terminating due to SIGCHLD\n");
435
+#endif
429 436
 			/* exit */
430 437
 			kill(0, SIGTERM);
431 438
 			DBG("terminating due to SIGCHLD\n");
... ...
@@ -631,7 +638,12 @@ static void sig_usr(int signo)
631 631
 			case SIGHUP:
632 632
 					break;
633 633
 			case SIGCHLD:
634
+#ifndef 			STOP_JIRIS_CHANGES
635
+					LOG(L_INFO, "INFO: SIGCHLD received: "
636
+						"we do not worry about grand-children\n");
637
+#else
634 638
 					exit(0); /* terminate if one child died */
639
+#endif
635 640
 		}
636 641
 	}
637 642
 }