For Programmers: Free Programming Magazines  


Home > Archive > PERL POE > May 2006 > POE::Resource::Signals::_data_sig_initialize() overwrites signal handles (if just wit









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author POE::Resource::Signals::_data_sig_initialize() overwrites signal handles (if just wit
sbk

2006-05-27, 7:08 pm

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%
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com