1
0
mirror of https://github.com/fluencelabs/wasmer synced 2024-12-15 15:15:40 +00:00
wasmer/lib/emscripten/emtests/test_execvp_windows.c
Mackenzie Clark 00e3ec1446 add execvp
2019-03-04 08:10:37 -08:00

19 lines
413 B
C
Vendored

#include <stdio.h>
#include <unistd.h>
int main() {
char command[] = "C:\\Windows\\System32\\cmd.exe";
char arg1[] = "echo";
char arg2[] = "foo";
char* argv[4];
argv[0] = command;
argv[1] = arg1;
argv[2] = arg2;
argv[3] = 0;
printf("_execvp\n");
int result = execvp(command, argv);
// should not return, and not print this message
printf("error");
return 0;
}