File 0823-erts-Ensure-dead-child-processes-don-t-become-zombie.patch of Package erlang
From 0405c7fd3202fcb6d8ce4c1c508429ab52283648 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?John=20H=C3=B6gberg?= <john@erlang.org>
Date: Thu, 3 Oct 2019 12:31:48 +0200
Subject: [PATCH 3/3] erts: Ensure dead child processes don't become zombies
---
erts/emulator/sys/unix/sys.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/erts/emulator/sys/unix/sys.c b/erts/emulator/sys/unix/sys.c
index 4823e549ea..ee17c8d7b5 100644
--- a/erts/emulator/sys/unix/sys.c
+++ b/erts/emulator/sys/unix/sys.c
@@ -689,6 +689,10 @@ void
erts_sys_unix_later_init(void)
{
sys_signal(SIGTERM, generic_signal_handler);
+
+ /* Ignore SIGCHLD to ensure orphaned processes don't turn into zombies on
+ * death when we're pid 1. */
+ sys_signal(SIGCHLD, SIG_IGN);
}
int sys_max_files(void)
--
2.16.4