| 524 | |
| 525 | |
| 526 | static void sigchld_handler(UNUSED(int val)) |
| 527 | { |
| 528 | #ifdef WNOHANG |
| 529 | while (waitpid(-1, NULL, WNOHANG) > 0) {} |
| 530 | #endif |
| 531 | #ifndef HAVE_SIGACTION |
| 532 | signal(SIGCHLD, sigchld_handler); |
| 533 | #endif |
| 534 | } |
| 535 | |
| 536 | |
| 537 | void start_accept_loop(int port, int (*fn)(int, int)) |