1 /*******************************************************************************
2 * The BYTE UNIX Benchmarks - Release 3
3 * Module: spawn.c SID: 3.3 5/15/91 19:30:20
5 *******************************************************************************
6 * Bug reports, patches, comments, suggestions should be sent to:
8 * Ben Smith, Rick Grehan or Tom Yagerat BYTE Magazine
9 * ben@bytepb.byte.com rick_g@bytepb.byte.com tyager@bytepb.byte.com
11 *******************************************************************************
13 * $Header: spawn.c,v 3.4 87/06/22 14:32:48 kjmcdonell Beta $
14 * August 29, 1990 - Modified timing routines (ty)
15 * October 22, 1997 - code cleanup to remove ANSI C compiler warnings
16 * Andy Kahn <kahn@zk3.dec.com>
18 ******************************************************************************/
19 char SCCSid
[] = "@(#) @(#)spawn.c:3.3 -- 5/15/91 19:30:20";
34 fprintf(stderr
,"COUNT|%lu|1|lps\n", iter
);
38 int main(int argc
, char *argv
[])
44 fprintf(stderr
,"Usage: %s duration \n", argv
[0]);
48 duration
= atoi(argv
[1]);
51 wake_me(duration
, report
);
54 if ((slave
= fork()) == 0) {
59 /* kill it right away */
61 } else if (slave
< 0) {
63 fprintf(stderr
,"Fork failed at iteration %lu\n", iter
);
70 fprintf(stderr
,"Bad wait status: 0x%x\n", status
);
75 printf("Child %d done.\n", slave
);