"Fossies" - the Fresh Open Source Software Archive

Member "netbiff-0.9.18/child.c" (21 Sep 2003, 273 Bytes) of package /linux/privat/old/netbiff-0.9.18.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #include "child.h"
    2 
    3 #include <sys/types.h>
    4 #include <sys/wait.h>
    5 #include <signal.h>
    6 #include <stdlib.h>
    7 
    8 static void child_handler() {
    9   signal(SIGCHLD, child_handler);
   10   while(waitpid(-1, NULL, WNOHANG) > 0) ;
   11 }
   12 
   13 void child_ignore() {
   14   signal(SIGCHLD, child_handler);
   15 }