summaryrefslogtreecommitdiff
path: root/src/shell_manager.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2012-07-31 14:21:25 +0200
committerMaxime Coste <frrrwww@gmail.com>2012-07-31 14:21:25 +0200
commitac2676cbcfa3be81b6136efc28b009bc25489c30 (patch)
tree79a9d2c351eff52a5b7b03f5d5faf268a5da891f /src/shell_manager.cc
parentb65f8cc887748a3076639f6eabab65fad40ac67f (diff)
ShellManager: catch all exception once we are in child process
Diffstat (limited to 'src/shell_manager.cc')
-rw-r--r--src/shell_manager.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/shell_manager.cc b/src/shell_manager.cc
index 265a8440..a8d1d2df 100644
--- a/src/shell_manager.cc
+++ b/src/shell_manager.cc
@@ -49,7 +49,7 @@ String ShellManager::pipe(const String& input,
close(read_pipe[0]);
waitpid(pid, NULL, 0);
}
- else
+ else try
{
close(write_pipe[1]);
close(read_pipe[0]);
@@ -95,7 +95,9 @@ String ShellManager::pipe(const String& input,
}
execlp("sh", "sh", "-c", cmdline.c_str(), NULL);
+ exit(-1);
}
+ catch (...) { exit(-1); }
return output;
}