Subject: | POE::Resource::Signals::_data_sig_initialize() overwrites signal handles (if just with IGNORE/DEFAULT) |
Date: | 22 May 2006 14:07:57 -0700 |
To: | poe [...] perl.org, perl-poe [...] moderators.isc.org |
From: | "sbk" <skendric [...] fhcrc.org> |
hi,
i'm realizing that loading POE replaces my signal handlers
is there a way around this? i rather like my signal handlers ... :)
they perform useful chores, like clean up shared memory segments. of
course, i rather like POE, too ... it does useful things for me ...
naturally, i want both!
--sk
stuart kendrick
fhcrc
guru% cat test
#!/opt/vdops/bin/perl
use strict;
use warnings;
use sigtrap 'handler' => \&shut_down, 'normal-signals';
use sigtrap 'handler' => \&shut_down, 'error-signals';
use POE;
while (1) {
sleep 60;
}
sub shut_down {
die "yay!";
}
guru%./test
[hit Ctrl-C here]
guru%
whereas if i remove the 'use POE;' line, i see the following:
guru%./test
yay! at ./test line 13.
guru%