mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-08-07 01:10:26 +00:00
drive-mirror: warn use POSIX::_exit on exec failure
This commit is contained in:
parent
3b4cf0f0fc
commit
ca5c27f065
@ -5926,17 +5926,16 @@ sub qemu_drive_mirror {
|
|||||||
die "forking socat tunnel failed";
|
die "forking socat tunnel failed";
|
||||||
} elsif ($pid == 0) {
|
} elsif ($pid == 0) {
|
||||||
exec(@$cmd);
|
exec(@$cmd);
|
||||||
exit(-1);
|
warn "exec failed: $!\n";
|
||||||
} else {
|
POSIX::_exit(-1);
|
||||||
$jobs->{"drive-$drive"}->{pid} = $pid;
|
}
|
||||||
|
$jobs->{"drive-$drive"}->{pid} = $pid;
|
||||||
|
|
||||||
my $timeout = 0;
|
my $timeout = 0;
|
||||||
while (1) {
|
while (!-S $unixsocket) {
|
||||||
last if -S $unixsocket;
|
die "nbd connection helper timed out\n"
|
||||||
die if $timeout > 5;
|
if $timeout++ > 5;
|
||||||
$timeout++;
|
sleep 1;
|
||||||
sleep 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
my $storecfg = PVE::Storage::config();
|
my $storecfg = PVE::Storage::config();
|
||||||
|
Loading…
Reference in New Issue
Block a user