windows does not have fork/wait

This commit is contained in:
jeff 2020-08-20 16:25:28 +00:00 committed by Jeff Becker
parent 30a6e901f5
commit d0374ce083
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05
1 changed files with 4 additions and 0 deletions

View File

@ -276,6 +276,9 @@ void
Execute(std::string cmd)
{
std::cout << cmd << std::endl;
#ifdef _WIN32
system(cmd.c_str());
#else
std::vector<std::string> parts_str;
std::vector<const char*> parts_raw;
std::stringstream in(cmd);
@ -313,6 +316,7 @@ Execute(std::string cmd)
{
waitpid(pid, 0, 0);
}
#endif
}
void