Use a dummy function for SIGPIPE instead of SIG_IGN
SIG_IGN is inherited after 'execve' and requires us to reset that signal handler, which does not work well with vfork on OSX. Using an empty function does the trick and will be auto reset to default on exec.
This commit is contained in:
parent
5f315e68b6
commit
b897a18aa6
|
@ -912,7 +912,7 @@ int main(int argc, char* argv[])
|
|||
set_signal_handler(SIGFPE, signal_handler);
|
||||
set_signal_handler(SIGQUIT, signal_handler);
|
||||
set_signal_handler(SIGTERM, signal_handler);
|
||||
set_signal_handler(SIGPIPE, SIG_IGN);
|
||||
set_signal_handler(SIGPIPE, [](int){});
|
||||
set_signal_handler(SIGINT, [](int){});
|
||||
set_signal_handler(SIGCHLD, [](int){});
|
||||
|
||||
|
|
|
@ -177,7 +177,6 @@ std::pair<String, int> ShellManager::eval(
|
|||
Pipe child_stdin{not input.empty()}, child_stdout, child_stderr;
|
||||
pid_t pid = spawn_shell(m_shell.c_str(), cmdline, shell_context.params, kak_env,
|
||||
[&child_stdin, &child_stdout, &child_stderr] {
|
||||
set_signal_handler(SIGPIPE, SIG_DFL);
|
||||
auto move = [](int oldfd, int newfd)
|
||||
{
|
||||
if (oldfd == newfd)
|
||||
|
|
Loading…
Reference in New Issue
Block a user