mirror of
git://git.proxmox.com/git/pve-common.git
synced 2025-01-08 01:17:37 +03: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
|
||||
local %ENV;
|
||||
if ($opts->{http_proxy}) {
|
||||
|
Loading…
Reference in New Issue
Block a user