Browse Source

Fix the vfork test so it actually works this time.
-Erik

Eric Andersen 22 years ago
parent
commit
7cfcc4fce5
1 changed files with 5 additions and 1 deletions
  1. 5 1
      test/unistd/vfork.c

+ 5 - 1
test/unistd/vfork.c

@@ -30,10 +30,14 @@ int main(void)
 {
 	pid_t pid;
 	int status, wpid;
+	char *argv[] = {
+		"/bin/ls",
+		NULL,
+	};
 
 	if ((pid = vfork()) == 0) {
 		printf("Hi.  I'm the child process...\n");
-		execvp("/bin/ls",NULL);
+		execvp(argv[0], argv);
 		_exit(0);
 	}