AgentX++: Problems with raise(SIGTERM) ?

Frank Fock Frank.Fock____t-online.de
Tue Jul 3 00:35:51 CEST 2001


Hello Christel,

I do not see any problems with your approach to catch the SIGTERM
signal and trying to reconnect to the master, but you should consider, that
the current implementation of SubAgentXMib::init() does no retries and
assumes that the master agent is accepting connections. So you will have
to introduce a delay and a timeout in order to prevent endless looping.

Best regards,
Frank

christel.sohnemann____philips.com wrote:

> Hello,
> there are several code lines in AgentX++ where a signal is raised, for example in "SubAgentXMib::init()". I am not  quite sure whether these raise-calls are used to terminate the program from where are they called or if they are just to perfrom control
> flow.  I call "SubAgentXMib::init()" method when the subagent tries to reconnect to a masteragent after the masteragent was detected as down.
> I wrote a signal-catching function sig() which is registered and sucessfully called after raise is called.
> I found in all the examples, that the example programs exit when this signal raises. The problem is that the subagent I wrote cannot terminate the program. So I do not do that but continue performing (in this case I continue trying to reconnect to the
> masteragent).
> However, I wonder if this could lead into any problems in "SubAgentXMib::init()" method ? It seems, as if the subagent hangs in a way, it does not continue trying to reconnect. When I start the masteragent again after a while, the subagent does not find
> out about that, it does not reconnect to the master.
> May the "raise" be the problem? Is it a problem not to leave the "SubAgentXMib::init()" method after a raise occured and continue executing it?
> Thank you for your help in advance.
> Best regards,
> Christel Sohnemann
>
> Christel Sohnemann
> Software Development
> Philips Speech Processing Aachen, Zweigniederlassung der Philips GmbH
> Kackertstr. 10, 52072 Aachen, Germany
> mailTo: christel.sohnemann at philips.com
> Tel:    +49 - (0)241 - 8871 191,    Fax: +49 - (0)241 - 8871 140
> http://www.speech.philips.com/






More information about the AGENTPP mailing list