Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Signal handlers for POE::Component::*

by nicholasrperez (Monk)
on Sep 25, 2005 at 04:49 UTC ( [id://494862]=note: print w/replies, xml ) Need Help??


in reply to Signal handlers for POE::Component::*

Well, how about instantiating your own session and install the signal handler there? Who says you need to be able to do it within the confines of the slave component? With end developer POE::Components, it is generally assumed that you will be running it as part of a larger framework with other sessions doing other things, such as receiving events, etc. Remember that all of POE (for the most part, save Wheel::Run and PoCo::Child) runs inside a single perl interpreter. It doesn't really matter where you install the signal handler, so do it outside of the slave component.

-- NPEREZ
  • Comment on Re: Signal handlers for POE::Component::*

Replies are listed 'Best First'.
Re^2: Signal handlers for POE::Component::*
by pope (Friar) on Sep 26, 2005 at 07:30 UTC

    Yes we can create our own session and install the sig handler there, but then when the sig handler needs to tell the component: "Hey we've just got SIGHUP here, so please close and reopen your log file!", what to do?

    normally we'll do: $kernel->post("logger", "do_rotate"); but since there are no InlineStates and friends, we can't specify "do_rotate" and its callback.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://494862]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-05-28 00:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found