jD91mZM2 преди 6 години
родител
ревизия
86a38b47d1
променени са 3 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 0 1
      tests/expected/unistd/exec.stderr
  2. 1 0
      tests/expected/unistd/exec.stdout
  3. 2 2
      tests/unistd/exec.c

+ 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;
 }