Skip to content

Commit

Permalink
fix: osh.pl: remove a warning on interactive mode timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
speed47 committed Oct 16, 2024
1 parent eb866bd commit e77fe25
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions bin/shell/osh.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit e77fe25

Please sign in to comment.