[PolyORB-users] Handling signals
Graham Stark
graham.stark at virtual-worlds.biz
Sat Mar 30 13:24:46 CET 2013
Hi,
> Hello guys,
> I would like to know how I can handle signals to perform sort of
> cleanup code on SIGINT.
> To be more precise, I have a kind of load balancer object which holds
> references to servant objects. These latter register themselves against
> the balancer. When the servant object get a SIGINT, I attached a
> handler to cleanly unregister it from the balancer.
> The problem is that I get this kind of message on the servant part :
> ^CUnregistering servant
> polyorb.orb_controller: no event source to monitor
> polyorb.orb: ORB.Run got exception:
> polyorb.orb: Exception name: PROGRAM_ERROR
> Message: dead lock detected
>
> And then I have to kill my servant and the balancer doesn't know that
> the servant is gone.
>
> Is there a specific way to do this kind of thing ?
>
There's an example of what I think you're after here:
http://www.pegasoft.ca/resources/boblap/14.html
(section 14.3).
I use something based on this to shut down connection pools in an AWS
application, and it works quite well.
Graham
--
Graham Stark, Virtual Worlds Research
http://www.virtual-worlds-research.com
136 Hainault Avenue, Milton Keynes, MK14 5PG, UK
t: (+044) 01908 618239 skype: graham_k_stark m:(+044) 075283 45116
More information about the PolyORB-users
mailing list