Subject: | SIGINT |
Date: | Tue, 3 Jul 2007 14:29:25 +0200 |
To: | bug-IPC-ChildSafe [...] rt.cpan.org |
From: | "Mattias Andersson" <mattias.j.andersson [...] gmail.com> |
Hi,
I think IPC::ChildSafe breaks my SIGINT handler. Consider the
following code snippet:
use strict;
use warnings;
use IPC::ChildSafe;
$SIG{INT} = sub { die "caught SIGIND\n" };
my $SH = IPC::ChildSafe->new('sh', 'echo ++EOT++', '++EOT++');
#$SH->cmd('ls');
#$SH->_puts('ls');
for(;;)
{
sleep(1);
}
If I hit Control-C my handler runs. If I comment one of the calls to
IPC::ChildSafe and hits Control-C the application exists without
running my handler. The sigint.pl program shipped with IPC::ChildSafe
seems to have the same problem.
; perl test.pl
^C
;
; perl -MIPC::ChildSafe -e 'print $IPC::ChildSafe::VERSION, "\n"'
3.16
; uname -a
SunOS 5.8 Generic_117350-46 sun4u sparc SUNW,Sun-Fire-V210
; perl -v
This is perl, v5.8.8 built for sun4-solaris
Copyright 1987-2006, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
;