1 /* Executes itself recursively to the depth indicated by the
2 first command-line argument. */
10 const char *test_name = "multi-recurse";
13 main (int argc UNUSED, char *argv[])
15 int n = atoi (argv[1]);
24 snprintf (child_cmd, sizeof child_cmd, "multi-recurse %d", n - 1);
25 CHECK ((child_pid = exec (child_cmd)) != -1, "exec(\"%s\")", child_cmd);
27 code = wait (child_pid);
29 fail ("wait(exec(\"%s\")) returned %d", child_cmd, code);