From 87d3f721e568de76c5a744e5026061dfd3c93e66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Lesimple?= Date: Thu, 3 Aug 2023 12:53:55 +0000 Subject: [PATCH] fix: clush: restore default handlers for SIGHUP/PIPE --- bin/plugin/open/clush | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/plugin/open/clush b/bin/plugin/open/clush index 3df1565..2aef1a3 100755 --- a/bin/plugin/open/clush +++ b/bin/plugin/open/clush @@ -54,6 +54,11 @@ if (not $command) { osh_exit 'ERR_MISSING_PARAMETER', "Missing mandatory parameter 'command'"; } +# restore default handlers (exit) for HUP and PIPE, we don't want to have this +# plugin looping endlessly in the void when there's no longer a terminal attached +$SIG{'PIPE'} = 'DEFAULT'; +$SIG{'HUP'} = 'DEFAULT'; + # # and test external command call #