Forráskód Böngészése

Fix broken exec test

jD91mZM2 6 éve
szülő
commit
86a38b47d1

+ 0 - 1
tests/expected/unistd/exec.stderr

@@ -1 +0,0 @@
-execv: No such file or directory

+ 1 - 0
tests/expected/unistd/exec.stdout

@@ -0,0 +1 @@
+exec works :D

+ 2 - 2
tests/unistd/exec.c

@@ -2,8 +2,8 @@
 #include <stdio.h>
 
 int main(int argc, char** argv) {
-    char *const args[1] = {"arg"};
-    execv("write", args);
+    char* args[] = {"sh", "-c", "echo 'exec works :D'", NULL};
+    execv("/bin/sh", args);
     perror("execv");
     return 0;
 }