mirror of
https://git.proxmox.com/git/pve-common
synced 2025-08-08 12:43:58 +00:00
tools: download_file_from_url: handle interrupts
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
60fb1c2628
commit
3a94648515
@ -1865,6 +1865,11 @@ sub download_file_from_url {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local $SIG{INT} = sub {
|
||||||
|
unlink $tmpdest or warn "could not cleanup temporary file: $!";
|
||||||
|
die "got interrupted by signal\n";
|
||||||
|
};
|
||||||
|
|
||||||
{ # limit the scope of the ENV change
|
{ # limit the scope of the ENV change
|
||||||
local %ENV;
|
local %ENV;
|
||||||
if ($opts->{http_proxy}) {
|
if ($opts->{http_proxy}) {
|
||||||
|
Loading…
Reference in New Issue
Block a user