From 85c9a125444042504a2c8c1111179663a322f497 Mon Sep 17 00:00:00 2001 From: Peter Hunt Date: Tue, 17 Mar 2020 10:45:39 -0400 Subject: [PATCH] ignore sigpipe conmon getting killed from SIGPIPE is another way it can be spuriously killed. These situations are very hard to recover from, so we should ignore them. This also fixes an issue where occasionally the splice() call to masterfd_stdin causes conmon to crash. It's pretty racy to try to check if stdin is still open, so we should just not crash instead Signed-off-by: Peter Hunt --- src/conmon.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/conmon.c b/src/conmon.c index 8da41e90..4dcb0080 100644 --- a/src/conmon.c +++ b/src/conmon.c @@ -1345,6 +1345,8 @@ int main(int argc, char *argv[]) close(oom_score_fd); } + /* ignoring SIGPIPE prevents conmon from being spuriously killed */ + signal(SIGPIPE, SIG_IGN); main_loop = g_main_loop_new(NULL, FALSE);