#define _POSIX_C_SOURCE 200112L #include #include #include #include #include "err.h" int main(int argc, char *argv[]) { switch(fork()) { case -1: FATAL("fork"); break; case 0: // le fils execlp("/bin/ls", "ls", NULL); // NOT REACHED FATAL("exec"); default: sleep(3600); // le pere } return EXIT_SUCCESS; }