diff --git a/src/common/async_cmd.cpp b/src/common/async_cmd.cpp index 71dba7d9c107f48d714d624540bfe701e34a8370..f9c60a2161d9c391d809d60ae21af87b492c1d55 100644 --- a/src/common/async_cmd.cpp +++ b/src/common/async_cmd.cpp @@ -104,6 +104,7 @@ int AsyncCmd::Popen(string command, bool readWrite, int &pid) return ERR_GENERIC; } if (childPid == 0) { + Base::DeInitProcess(); if (readWrite) { dup2(fd[PIPE_WRITE], STDOUT_FILENO); dup2(fd[PIPE_WRITE], STDERR_FILENO); @@ -140,6 +141,7 @@ bool AsyncCmd::ExecuteCommand(const string &command) { string cmd = command; Base::Trim(cmd, "\""); + Base::DeInitProcess(); if ((fd = Popen(cmd, true, pid)) < 0) { return false; }