diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2012-08-29 00:08:39 +0200 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2012-08-29 00:08:39 +0200 |
| commit | 2d82e2a2c609b102b62d27e864a9a2f87df6995b (patch) | |
| tree | 2db6ff307144971db37c734a582da051fd27fcbe /src/shell_manager.cc | |
| parent | ab47b72dc84e49d9b7e647b08af93020fa510616 (diff) | |
fix ShellManager, avoid zombie childs when grand childs detaches themselves
Diffstat (limited to 'src/shell_manager.cc')
| -rw-r--r-- | src/shell_manager.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shell_manager.cc b/src/shell_manager.cc index 18f7c896..81643dad 100644 --- a/src/shell_manager.cc +++ b/src/shell_manager.cc @@ -54,8 +54,8 @@ String ShellManager::pipe(const String& input, close(write_pipe[1]); close(read_pipe[0]); - dup2(read_pipe[1], 1); - dup2(write_pipe[0], 0); + dup2(read_pipe[1], 1); close(read_pipe[1]); + 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> end; |
