summaryrefslogtreecommitdiff
path: root/src/shell_manager.cc
diff options
context:
space:
mode:
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;
}