Explorar o código

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

Eric Andersen %!s(int64=22) %!d(string=hai) anos
pai
achega
7cfcc4fce5
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  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);
 	}