From e77fe25ac6f286a0c9635b019f6dd86ca96c054b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Lesimple?= Date: Wed, 16 Oct 2024 08:33:46 +0000 Subject: [PATCH] fix: osh.pl: remove a warning on interactive mode timeout --- bin/shell/osh.pl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bin/shell/osh.pl b/bin/shell/osh.pl index 49949fe83..f1dd7d756 100755 --- a/bin/shell/osh.pl +++ b/bin/shell/osh.pl @@ -1612,9 +1612,13 @@ sub exit_sig { signal => $sig, ); } - # ensure the signal is propagated to our progress group, then exit - $SIG{$sig} = 'IGNORE'; - kill $sig, 0; + # ensure the signal is propagated to our progress group, then exit. + # this func is also called as the timeoutHandler of interactive mode, + # and in this case $sig == 'TIMEOUT', which is not a real signal + if ($sig ne 'TIMEOUT') { + $SIG{$sig} = 'IGNORE'; + kill $sig, 0; + } exit OVH::Bastion::EXIT_OK; }