From 4f670845ff9ab6c48bcb5f7bf4d4ef6dc3c3064b Mon Sep 17 00:00:00 2001 From: manuel Date: Tue, 27 Mar 2012 11:51:08 +0200 Subject: reorganize file structure to match the upstream requirements --- pintos-progos/examples/recursor.c | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 pintos-progos/examples/recursor.c (limited to 'pintos-progos/examples/recursor.c') diff --git a/pintos-progos/examples/recursor.c b/pintos-progos/examples/recursor.c deleted file mode 100644 index 79c784a..0000000 --- a/pintos-progos/examples/recursor.c +++ /dev/null @@ -1,34 +0,0 @@ -#include -#include -#include - -int -main (int argc, char *argv[]) -{ - char buffer[128]; - pid_t pid; - int retval = 0; - - if (argc != 4) - { - printf ("usage: recursor \n"); - exit (1); - } - - /* Print args. */ - printf ("%s %s %s %s\n", argv[0], argv[1], argv[2], argv[3]); - - /* Execute child and wait for it to finish if requested. */ - if (atoi (argv[2]) != 0) - { - snprintf (buffer, sizeof buffer, - "recursor %s %d %s", argv[1], atoi (argv[2]) - 1, argv[3]); - pid = exec (buffer); - if (atoi (argv[3])) - retval = wait (pid); - } - - /* Done. */ - printf ("%s %s: dying, retval=%d\n", argv[1], argv[2], retval); - exit (retval); -} -- cgit v1.2.3