diff options
Diffstat (limited to 'grapher')
-rw-r--r-- | grapher/grapher.cxx | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/grapher/grapher.cxx b/grapher/grapher.cxx index 1e5e30b8..567b0405 100644 --- a/grapher/grapher.cxx +++ b/grapher/grapher.cxx @@ -227,19 +227,14 @@ int StapLauncher::launch() &ChildDeathReader::ioCallback), signalPipe[0], Glib::IO_IN); } + struct sigaction action; + action.sa_sigaction = handleChild; + sigemptyset(&action.sa_mask); + action.sa_flags = SA_SIGINFO | SA_NOCLDSTOP; + sigaction(SIGCLD, &action, 0); } - struct sigaction action; - action.sa_sigaction = handleChild; - sigemptyset(&action.sa_mask); - action.sa_flags = SA_SIGINFO | SA_NOCLDSTOP; - sigaction(SIGCLD, &action, 0); int pipefd[4]; - if (pipe(&pipefd[0]) < 0) - { - std::perror("pipe"); - exit(1); - } - if (pipe(&pipefd[2]) < 0) + if (pipe(&pipefd[0]) < 0 || pipe(&pipefd[2]) < 0) { std::perror("pipe"); exit(1); |