E N D
--- uClibc-nptl/test/nptl/tst-exec4.c 2006-06-28 19:13:17.000000000 +0200 +++ sh4-port/uClibc-nptl/test/nptl/tst-exec4.c 2006-08-02 16:48:27.000000000 +0200 @@ -50,9 +50,10 @@ ++n; char **argv = (char **) alloca ((n + 1) * sizeof (char *)); - for (n = 0; oldargv[n + 1] != NULL; ++n) - argv[n] = oldargv[n + 1]; - argv[n++] = (char *) "--direct"; + for (n = 0; oldargv[n] != NULL; ++n) + argv[n] = oldargv[n]; + + argv[++n] = (char *) "--direct"; argv[n] = NULL; execv (argv[0], argv); @@ -66,7 +67,7 @@ static int do_test (int argc, char *argv[]) { - if (argc == 1) + if (argc > 1) { /* This is the second call. Perform the test. */ struct sigaction sa; @@ -96,7 +97,7 @@ return 0; } - + pthread_t th; if (pthread_create (&th, NULL, tf, argv) != 0) {