#include #include #include #include #include void handler(int sig) { printf("paf\n"); } int main(void) { signal(SIGINT, handler); // TODO: utiliser sigaction() plutôt que signal() ! if (fork() == 0) { printf("child: %d %d\n", getpid(), getpgid(0)); pause(); printf("child: bye bye!\n"); exit(EXIT_SUCCESS); } printf("father: %d %d\n", getpid(), getpgid(0)); pause(); printf("father: bye bye!\n"); return EXIT_SUCCESS; }