Re: Signal handling

John Ogness <[email protected]>
Newsgroups gmane.linux.dazuko.devel
Message-ID <[email protected]>
Hi,

Which version of Dazuko are you using? This is a bit of a controversial
issue, and I am not sure how to handle it.

In the new pre-release version of Dazuko, a SIGTERM to the registered
application will not only cause dazukoGetAccess to return with an error,
but it will also unregister the applicatoin with Dazuko!

This would be dangerous for applications that will continue working,
even though a SIGTERM has been sent. The advantage of this, is it allows
Dazuko to avoid problems of applications not unregistering themselves
before they quit. However, I am not happy about this and will be
changing it before the next version is released.

So what should Dazuko do?

Do you think dazukoGetAccess should continue blocking, even though a
SIGTERM has been sent? In my opinion this is not an option, since the
application *must* have a chance to exit if it wants.

A good solution would be if different error codes were returned (rather
than simply !0). Then you could know if dazukoGetAccess failed because
of some real problem, or because an interruption signal was sent. What
do you think?

John Ogness


Jaroslav Suchanek wrote:
> Hi,
> 
> Is it correct, that after sending signal (e.g. SIGTERM) function 
> dazukoGetAccess always return error code?
> 
> Is there any way, how to handle signal and continue working with dazuko?
> 
> Thanks for all ideas,
> 
> Jaroslav Suchanek
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.