11 char *name
[] = {"t10a", "t10b", "t10c", "t10d", "t10e", "t10f", "t10g",
12 "t10h", "t10i", "t10j"};
14 #define PROGBUF_LONGS 3000
15 long prog
[PROGBUF_LONGS
];
24 void cr_file(char *name
, int size
);
33 system("cp ../t10a .");
36 /* Create files t10b ... t10h */
41 execl("t10a", "t10a", (char *) 0);
46 execl("t10b", "t10b", (char *) 0);
51 execl("t10c", "t10c", (char *) 0);
56 execl("t10d", "t10d", (char *) 0);
61 for (i
= 0; i
< 60; i
++) {
66 for (i
= 0; i
< 4; i
++) wait(&n
);
69 return(-1); /* impossible */
77 if ((pid
= fork()) != 0) {
78 wait(&n
); /* wait for some child (any one) */
80 execl(name
[n
], name
[n
], (char *) 0);
82 printf("Child execl didn't take. file=%s errno=%d\n", name
[n
], errno
);
85 printf("Worse yet, EXIT didn't exit\n");
94 printf("Can't open t10a\n");
97 psize
= read(fd
, (char *) prog
, PROGBUF_LONGS
* 4);
98 cr_file("t10b", 1600);
99 cr_file("t10c", 1400);
100 cr_file("t10d", 2300);
101 cr_file("t10e", 3100);
102 cr_file("t10f", 2400);
103 cr_file("t10g", 1700);
104 cr_file("t10h", 1500);
105 cr_file("t10i", 4000);
106 cr_file("t10j", 2250);
110 void cr_file(name
, size
)
118 fd
= creat(name
, 0755);
119 write(fd
, (char *) prog
, psize
);