From 9c4230ad9c2703bb051a96ceea2698121d75e54c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 20 Dec 2018 09:29:09 +0530 Subject: [PATCH] Add a comment for why we reset SIGPIPE --- kitty/child.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kitty/child.c b/kitty/child.c index c520601b3..530e73493 100644 --- a/kitty/child.c +++ b/kitty/child.c @@ -115,6 +115,8 @@ spawn(PyObject *self UNUSED, PyObject *args) { for (int c = 3; c < 201; c++) close(c); environ = env; + // for some reason SIGPIPE is set to SIG_IGN, so reset it, needed by bash, + // which does not reset signal handlers on its own signal(SIGPIPE, SIG_DFL); execvp(exe, argv); // Report the failure and exec a shell instead, so that we are not left