mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-08-14 00:38:08 +00:00
swtmp: die early in startup check
no point in waiting another 50 ms if we know that we'd die already anyway.. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
6bbcd71f94
commit
90c41bac8f
@ -3060,9 +3060,8 @@ sub start_swtpm {
|
|||||||
|
|
||||||
my $tries = 100; # swtpm may take a bit to start before daemonizing, wait up to 5s for pid
|
my $tries = 100; # swtpm may take a bit to start before daemonizing, wait up to 5s for pid
|
||||||
while (! -e $paths->{pid}) {
|
while (! -e $paths->{pid}) {
|
||||||
|
die "failed to start swtpm: pid file '$paths->{pid}' wasn't created.\n" if --$tries == 0;
|
||||||
usleep(50_000);
|
usleep(50_000);
|
||||||
die "failed to start swtpm: pid file '$paths->{pid}' wasn't created.\n"
|
|
||||||
if --$tries == 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# return untainted PID of swtpm daemon so it can be killed on error
|
# return untainted PID of swtpm daemon so it can be killed on error
|
||||||
|
Loading…
Reference in New Issue
Block a user