MCPcopy Create free account
hub / github.com/FEX-Emu/FEX / ExecAndWaitForResponse

Function ExecAndWaitForResponse

Source/Tools/FEXRootFSFetcher/Main.cpp:116–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114
115namespace Exec {
116int32_t ExecAndWaitForResponse(const char* path, char* const* args) {
117 pid_t pid = fork();
118 if (pid == 0) {
119 execvp(path, args);
120 _exit(-1);
121 } else {
122 int32_t Status {};
123 waitpid(pid, &Status, 0);
124 if (WIFEXITED(Status)) {
125 return (int8_t)WEXITSTATUS(Status);
126 }
127 }
128
129 return -1;
130}
131
132int32_t ExecAndWaitForResponseRedirect(const char* path, char* const* args, int stdoutRedirect = -2, int stderrRedirect = -2) {
133 pid_t pid = fork();

Callers 6

DownloadToPathFunction · 0.85
ExecWithQuestionFunction · 0.85
ExecWithInfoFunction · 0.85
UnsquashRootFSFunction · 0.85
ExtractEroFSFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected