Subject: | Perl Debugger hangs when I am debugging the compress zlib scripts. |
STEPS TO DUPLICATE:
1. Copy the attached code snippet to a file
=a
This test script does below operations,
1. creates a gz file
2. Closes file handle
3. Retries to close the same file handle again
=cut
use IO::File ;
use Compress::Zlib ;
my $filename = "rw.gz" ;
#create a test file
ok(1, my $fil = gzopen($filename, "wb")) ;
ok(2, ! $fil->gzclose ) ;
ok(3, ! $fil->gzclose ) ;
BEGIN{ unlink "rw.gz"; }
END{ unlink "rw.gz"; }
sub ok
{
my ($no, $ok) = @_ ;
print "ok $no\n" if $ok ;
print "not ok $no\n" unless $ok ;
}
2. Execute at CLI thru debugger
3. After second call
ok(3, ! $fil->gzclose ) ;
type p $! in debugger
RESULTS:
Shell hangs.