diff --git a/FileUtils.cpp b/FileUtils.cpp index 708d2452..b2be5458 100644 --- a/FileUtils.cpp +++ b/FileUtils.cpp @@ -342,7 +342,14 @@ int CExecSock::popen2(int & iReadFD, int & iWriteFD, const CString & sCommand) { dup2(rpipes[1], 2); close(wpipes[0]); close(rpipes[1]); - system( sCommand.c_str() ); + char *pArgv[] = + { + "sh", + "-c", + (char *)sCommand.c_str(), + NULL + }; + execvp( "sh", pArgv ); exit(0); }