2 ** Copyright 2002, Manuel J. Petit. All rights reserved.
3 ** Distributed under the terms of the NewOS License.
9 #include <sys/syscalls.h>
13 usage(char const *app
)
15 printf("usage: %s [-s] ###\n", app
);
20 main(int argc
, char *argv
[])
31 if(strcmp(argv
[1], "-s")== 0) {
49 char *aaargv
[]= { argv
[0], "-s", buffer
, NULL
};
52 sprintf(buffer
, "%d", num
-1);
53 pid
= _kern_proc_create_proc(aaargv
[0], aaargv
[0], aaargv
, aaargc
, 5, 0);
54 _kern_proc_wait_on_proc(pid
, &retcode
);
57 sprintf(buffer
, "%d", num
-2);
58 pid
= _kern_proc_create_proc(aaargv
[0], aaargv
[0], aaargv
, aaargc
, 5, 0);
59 _kern_proc_wait_on_proc(pid
, &retcode
);
66 printf("%d\n", result
);