mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-13 22:25:40 +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;
|
||
|
}
|