mirror of
https://github.com/fluencelabs/wasmer
synced 2025-07-02 18:11:34 +00:00
add execvp
This commit is contained in:
17
lib/emscripten/emtests/test_execvp.c
vendored
Normal file
17
lib/emscripten/emtests/test_execvp.c
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
#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;
|
||||
}
|
Reference in New Issue
Block a user