#include #include "myutils.h" int main() { int i; int res; printf("PADRE: PID %d\n", getpid()); for (i=0; i<5; i++) { res = fork(); if (res < 0) sys_err("errore nella creazione"); if (res == 0) { /* siamo nel figlio */ printf("PID: %d PID del padre: %d\n", getpid(), getppid()); exit(-1); } } }