3 /* Copyright (C) 1987 by Martin Leisner. All rights reserved. */
4 /* Used by permission. */
12 #define NUM_TIMES 1000
16 _PROTOTYPE(int main
, (void));
17 _PROTOTYPE(void quit
, (void));
25 fflush(stdout
); /* have to flush for child's benefit */
27 system("rm -rf DIR_12; mkdir DIR_12");
30 for (i
= 0; i
< NUM_TIMES
; i
++) switch (fork()) {
31 case 0: exit(1); break;
33 printf("fork broke\n");
35 default: wait(&k
); break;
39 return(-1); /* impossible */
46 system("rm -rf DIR*");
52 printf("%d errors\n", errct
);