fix ShellManager, avoid zombie childs when grand childs detaches themselves

This commit is contained in:
Maxime Coste 2012-08-29 00:08:39 +02:00
parent ab47b72dc8
commit 2d82e2a2c6

View File

@ -54,8 +54,8 @@ String ShellManager::pipe(const String& input,
close(write_pipe[1]); close(write_pipe[1]);
close(read_pipe[0]); close(read_pipe[0]);
dup2(read_pipe[1], 1); dup2(read_pipe[1], 1); close(read_pipe[1]);
dup2(write_pipe[0], 0); dup2(write_pipe[0], 0); close(write_pipe[0]);
boost::regex_iterator<String::iterator> it(cmdline.begin(), cmdline.end(), m_regex); boost::regex_iterator<String::iterator> it(cmdline.begin(), cmdline.end(), m_regex);
boost::regex_iterator<String::iterator> end; boost::regex_iterator<String::iterator> end;