2
0

exec.c 247 B

123456789101112
  1. #include <unistd.h>
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4. #include "test_helpers.h"
  5. int main(void) {
  6. char* args[] = {"sh", "-c", "echo 'exec works :D'", NULL};
  7. int status = execv("/bin/sh", args);
  8. ERROR_IF(execv, status, == -1);
  9. }