- to parent process also gets sent to the child..
- */
- old_sighup = signal(SIGHUP, kill_child_handler);
- old_sigterm = signal(SIGTERM, kill_child_handler);
- while (cont)
+ to parent process also gets sent to the child.. */
+ old_sighup = signal(SIGHUP, normal_stop_handler);
+ old_sigterm = signal(SIGTERM, normal_stop_handler);
+ old_sigusr1 = signal(SIGUSR1, normal_stop_handler);
+
+ sigemptyset(&sa2.sa_mask);
+ sa2.sa_handler = sigusr2_handler;
+ sa2.sa_flags = 0;
+ sigaction(SIGUSR2, &sa2, &sa1);
+
+ while (cont && !child_got_signal_from_us)