mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-13 06:15:33 +00:00
18 lines
347 B
C
18 lines
347 B
C
#include <stdio.h>
|
|
#include <unistd.h>
|
|
|
|
int main() {
|
|
char command[] = "touch";
|
|
char arg1[] = "foo.txt";
|
|
char* argv[3];
|
|
argv[0] = command;
|
|
argv[1] = arg1;
|
|
argv[2] = 0;
|
|
|
|
printf("_execvp\n");
|
|
int result = execvp(command, argv);
|
|
// should not return, and not print this message
|
|
printf("error");
|
|
return 0;
|
|
}
|