2
0

exec.c 185 B

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