TP-systeme-exploitation-cen.../TP1/fournitures/forktest.c
2023-06-20 20:57:09 +02:00

12 lines
409 B
C

#include <stdio.h> /* printf */
#include <unistd.h> /* fork */
#include <stdlib.h> /* EXIT_SUCCESS */
int main() {
fork(); printf("fork 1 : processus %d, de père %d\n", getpid(), getppid());
fork(); printf("fork 2 : processus %d, de père %d\n", getpid(), getppid());
fork(); printf("fork 3 : processus %d, de père %d\n", getpid(), getppid());
//sleep(180);
return EXIT_SUCCESS;
}