From 47cbbfb1abdbee18ebc173fef741d04d00fd2fc4 Mon Sep 17 00:00:00 2001 From: Neil Wilson Date: Tue, 25 Jun 2019 01:09:09 +0100 Subject: [PATCH] Stop post start subshell ending up as a zombie (#675) foreground.sh: Double detach the post_start subshell to ensure it is reaped properly by 'init' after it has completed and avoid a zombie process hanging around. --- priv/libexec/commands/foreground.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/priv/libexec/commands/foreground.sh b/priv/libexec/commands/foreground.sh index b1b8bbb6..53ee17ce 100755 --- a/priv/libexec/commands/foreground.sh +++ b/priv/libexec/commands/foreground.sh @@ -41,5 +41,5 @@ post_start_fg() { run_hooks post_start } -post_start_fg & +(post_start_fg &) erlexec "$@" -- "${1+$ARGS}"