summaryrefslogtreecommitdiff
path: root/src/shell_manager.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2012-08-29 00:08:39 +0200
committerMaxime Coste <frrrwww@gmail.com>2012-08-29 00:08:39 +0200
commit2d82e2a2c609b102b62d27e864a9a2f87df6995b (patch)
tree2db6ff307144971db37c734a582da051fd27fcbe /src/shell_manager.cc
parentab47b72dc84e49d9b7e647b08af93020fa510616 (diff)
fix ShellManager, avoid zombie childs when grand childs detaches themselves
Diffstat (limited to 'src/shell_manager.cc')
-rw-r--r--src/shell_manager.cc4
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;