~ This removes the SIGCHLD handler, so we don't try to write * to a broken pipe. */
| 843 | /*~ This removes the SIGCHLD handler, so we don't try to write |
| 844 | * to a broken pipe. */ |
| 845 | static void remove_sigchild_handler(struct io_conn *sigchld_conn) |
| 846 | { |
| 847 | struct sigaction sigchild; |
| 848 | |
| 849 | memset(&sigchild, 0, sizeof(struct sigaction)); |
| 850 | sigchild.sa_handler = SIG_DFL; |
| 851 | sigaction(SIGCHLD, &sigchild, NULL); |
| 852 | io_close(sigchld_conn); |
| 853 | } |
| 854 | |
| 855 | /*~ This is the routine which sets up the sigchild handling. We just |
| 856 | * reap them for now so they don't become zombies, but our subd |