in reply to $SIG{INT} unlink problem
Update: added file check as per sauoq's post.my $is_break = 0; $SIG{INT} = sub { $is_break = 1 }; my $result = is_success( getstore( $uri, $localfile ) ); if($is_break) { print STDERR 'Removing incomplete download...'; -f $localfile and ( unlink $localfile or print STDERR "\rCouldn't remove incompletely downloaded $lo +calfile: $!\n" ); } exit $result;
Makeshifts last the longest.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: $SIG{INT} unlink problem
by sauoq (Abbot) on Aug 21, 2002 at 01:11 UTC | |
|
Re: Re: $SIG{INT} unlink problem
by Cirollo (Friar) on Aug 22, 2002 at 13:41 UTC |