Hi Martin,

Thanks for your help.  I found the signal in nox.cc.  There is a
Shutdown_event that can be registered for these purposes.  It
registers for SIGTERM, SIGHUP and SIGINT.  This is probably the
easiest way to do this.

Regards
KK

PS>> Wondering how to make register this for all the destructors of
components.  But this is non-critical.

2009/12/31 Martin Casado <[email protected]>:
> Currently there is no graceful shutdown implemented within Nox.  One option
> would be to create a new event which is thrown on a given signal (e.g. USR1)
> and register handlers for cleanup.
>
>> Hi,
>>
>> I am wondering how I can use the component's destructor to do some
>> cleanup, e.g., dump state to a file.  I can clearly write one, but
>> will it be called.  Kill NOX using Ctrl-C does not seems to trigger it
>> (using NOX 0.6).
>>
>> Any advice is appreciated.  Thanks.
>>
>> Regards
>> KK
>>
>> _______________________________________________
>> nox-dev mailing list
>> [email protected]
>> http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
>>
>
>

_______________________________________________
nox-dev mailing list
[email protected]
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org

Reply via email to