4381bb2a22
When the execution reaches the end of the main functions, they implicitly return a successful status.
9 lines
171 B
C
9 lines
171 B
C
#include <unistd.h>
|
|
#include <stdio.h>
|
|
|
|
int main(void) {
|
|
char* args[] = {"sh", "-c", "echo 'exec works :D'", NULL};
|
|
execv("/bin/sh", args);
|
|
perror("execv");
|
|
}
|