SIGCHLDã®åä¿¡ #include <sys/types.h> /* ã»ãã®sysãããããå ã«ãã®ãã¡ã¤ã«ãinlcudeãã */ #include <sys/wait.h> /* waitpid()ã¨ãã¯ãã®ããã */ #include <signal.h> /* ã·ã°ãã«é¢æ°ã®ããã */ #include <stdio.h> /* fprintf()ã®ããã */ #include <unistd.h> /* fork()ã®ããã */ void sig_chld(int); /* SIGCHLDãã³ãã©ã®ãããã¿ã¤ãå®£è¨ */ int main() { struct sigaction act; pid_t pid; /* sig_chldãSIGCHLDãã³ãã©ã¨ãã */ act.sa_handler = sig_chld; /* ãã®ä¾ã§ã¯ããã®ã»ãã®ã·ã°ãã«ã¯ã
{{#tags}}- {{label}}
{{/tags}}