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.cc12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/shell_manager.cc b/src/shell_manager.cc
index f037371c..afc43324 100644
--- a/src/shell_manager.cc
+++ b/src/shell_manager.cc
@@ -50,10 +50,6 @@ String ShellManager::pipe(StringView input,
::pipe(read_pipe);
::pipe(error_pipe);
- static sig_atomic_t exited; exited = 0;
- static sig_atomic_t sig_exit_status;
- signal(SIGCHLD, [](int) { wait(&sig_exit_status); exited = 1; });
-
String output;
if (pid_t pid = fork())
{
@@ -86,13 +82,7 @@ String ShellManager::pipe(StringView input,
if (not error.empty())
write_debug("shell stderr: <<<\n" + error + ">>>");
- signal(SIGCHLD, SIG_DFL);
-
- if (not exited)
- waitpid(pid, exit_status, 0);
- else if (exit_status)
- *exit_status = sig_exit_status;
-
+ waitpid(pid, exit_status, 0);
if (exit_status)
{
if (WIFEXITED(*exit_status))