Hi!

On Tue, 2019-07-23 at 20:44:35 +0100, Ian Jackson wrote:
> Package: libdpkg-perl
> Version: 1.18.25
> Severity: normal

> $ perl -we 'use Data::Dumper; print Dumper($SIG{INT})'
> $VAR1 = undef;
> $ perl -we 'use Data::Dumper; use Dpkg::Source::Package; print 
> Dumper($SIG{INT})'
> $VAR1 = sub { "DUMMY" };
> $
> 
> This is a problem because when a SIGINT handler is installed, perl
> will not immediately exit when it is in some other C library.
> 
> For example,
> 
> $ perl -we 'use Data::Dumper; use WWW::Curl::Easy; my $curl = 
> WWW::Curl::Easy->new; $curl->setopt(CURLOPT_URL, "http://192.0.2.1";); 
> $curl->perform()'
> ^C [returns prompt immediately]
> $ perl -we 'use Data::Dumper; use WWW::Curl::Easy; use Dpkg::Source::Package; 
> my $curl = WWW::Curl::Easy->new; $curl->setopt(CURLOPT_URL, 
> "http://192.0.2.1";); $curl->perform()'
> ^C [hangs]
> 
> If libdpkg-perl needs a signal handler it should install it only
> during its own operations, probably localising it and arranging to
> chain to the original handler (if any) when it has done its own work.

Ah indeed, this is not good.

> But I doubt the necessity.

This is coming from Dpkg::Exit, to hook up temporary file cleanup
handlers. The problem is that due to backwards compatibility this
has not been fixable in the past. But I guess it's about time to
start bumping module versions to 2.00 and start cleaning up this
kind of thing.

So I've fixed this locally, and will include that in 1.20.0.

Thanks,
Guillem

Reply via email to