[Openais] [PATCH][corosync] Return CS_ERR_INTERRUPT to library users

Chrissie Caulfield ccaulfie at redhat.com
Thu Jun 25 08:25:03 PDT 2009


Steven Dake wrote:
> The change is a good idea, but I'd rather not stick more error code
> handling requirements on the user.  Can't we just use try again instead?
> 

Hmmm

ERR_INTERRUPT is already a listed return code, and most people doing
communications are used to trapping something similar I think. Also I
don't really think that ERR_TRY_AGAIN properly captures what has happened.

But I'm not going to get anal about this. Does anyone else have an opinion?

Chrissie

> 
> On Thu, 2009-06-25 at 10:03 +0100, Chrissie Caulfield wrote:
>> Currently coroipcc detects EINTR returns from poll() etc and simply
>> retries the operation without informing the clients.
>>
>> I think the clients need to know a signal has been detected. Many
>> daemons trap SIGINT to help them shutdown cleanly, and this used to
>> work. Now they get the signal delivered but calls like quorum_dispatch()
>> do not return so they can't tidy up and close down.
>>
>> This patch changes the behaviour so that if EINTR is detected it is
>> passed back to the clients as CS_ERR_INTERRUPT. The clients can then
>> retry the operation or exit as they see fit.
>>
>> _______________________________________________
>> Openais mailing list
>> Openais at lists.linux-foundation.org
>> https://lists.linux-foundation.org/mailman/listinfo/openais
>


More information about the Openais mailing list