From: Jacob Bachmeyer Date: Sat, 27 Feb 2021 03:36:10 +0000 (-0600) Subject: Improve shutdown logic in mock syslog server X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=97578020bb05509514c68625919e472863756e6f;p=gatekeeper.git Improve shutdown logic in mock syslog server --- diff --git a/testsuite/lib/exec/minlogd.pl b/testsuite/lib/exec/minlogd.pl index 88b1483..e018f29 100755 --- a/testsuite/lib/exec/minlogd.pl +++ b/testsuite/lib/exec/minlogd.pl @@ -100,8 +100,7 @@ sub handle_command ($) { chomp $command; if ($command eq 'exit') { - print "minlogd: shutting down\n"; - cleanup; exit + $Running = 0; } } @@ -191,9 +190,10 @@ do { accumulate_command if vec($Rrdy, (fileno STDIN), 1); # wait for input - select $Rrdy=$Rchk, undef, undef, undef; + select $Rrdy=$Rchk, undef, undef, undef if $Running; } while ($Running); +print "minlogd: shutting down\n"; cleanup; exit;