2 * mysplit.c - Another handy routine for testing your tiny shell
5 * Fork a child that spins for <n> seconds in 1-second chunks.
10 #include <sys/types.h>
14 int main(int argc
, char **argv
)
19 fprintf(stderr
, "Usage: %s <n>\n", argv
[0]);
25 if (fork() == 0) { /* child */
26 for (i
=0; i
< secs
; i
++)
31 /* parent waits for child to terminate */