Changeset 26 for trunk/forca.c
- Timestamp:
- Apr 18, 2014, 8:10:14 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/forca.c
r2 r26 6 6 int x = fork(); 7 7 if (x < 0){ 8 9 10 } else {11 12 while(1) printf("Processo padre (Figlio:%d)\n", x);13 } else {14 while(1) printf("Processo figlio (%d)\n", x);15 }8 perror("Errore nella fork:"); 9 exit(1); 10 } 11 if (x != 0){ 12 while(1) printf("Processo padre (x == %d)\n", x); 13 } 14 else { // x == 0 15 while(1) printf("Processo figlio (x == %d)\n", x); 16 16 } 17 17 return 0; 18 18 } 19 20 21 22
Note:
See TracChangeset
for help on using the changeset viewer.