Mailing List Archive

Patch : slapd : Even if kill command fails in terminate, return success.
Hi

Even if kill fails in terminate, return success.
When kill fails, this is the patch which I revised to return an error
definitely.

Regards,
Tomo
Re: Patch : slapd : Even if kill command fails in terminate, return success. [ In reply to ]
Hi Tomo,

On Tue, Mar 27, 2012 at 10:27:36AM +0900, nozawat wrote:
> Hi
>
> Even if kill fails in terminate, return success.
> When kill fails, this is the patch which I revised to return an error
> definitely.

This patch doesn't look right. What if the first kill(1) fails
(because, say, the process just exited)? And if '$result' is -ne
0, then the while loop will finish anyway.

Anyway, the terminate function looks too complicated for what it
does.

Can we also do a global replace s/result/rc/?

Cheers,

Dejan

> Regards,
> Tomo


> _______________________________________________________
> Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/

_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
Re: Patch : slapd : Even if kill command fails in terminate, return success. [ In reply to ]
Hi Dejan

Thank you for your reply.
> This patch doesn't look right. What if the first kill(1) fails
> (because, say, the process just exited)? And if '$result' is -ne
> 0, then the while loop will finish anyway.
Yes,And output an error in an origin of summons and retry it.
because kill repaid return 0 in the case of an error as for me, I made
modifications to return 1 and output an error.

> Anyway, the terminate function looks too complicated for what it
> does.
As for this correction, a logic is surely complicated.
By the way, as for this correction, kill is effective when the error
except the case without a process occurs. The situation did not hit on
me.

> Can we also do a global replace s/result/rc/?
OK,I contribute a patch again.

2012$BG/(B3$B7n(B29$BF|(B22:35 Dejan Muhamedagic <dejan@suse.de>:
> Hi Tomo,
>
> On Tue, Mar 27, 2012 at 10:27:36AM +0900, nozawat wrote:
>> Hi
>>
>> Even if kill fails in terminate, return success.
>> When kill fails, this is the patch which I revised to return an error
>> definitely.
>
> This patch doesn't look right. What if the first kill(1) fails
> (because, say, the process just exited)? And if '$result' is -ne
> 0, then the while loop will finish anyway.
>
> Anyway, the terminate function looks too complicated for what it
> does.
>
> Can we also do a global replace s/result/rc/?
>
> Cheers,
>
> Dejan
>
>> Regards,
>> Tomo
>
>
>> _______________________________________________________
>> Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
>> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
>> Home Page: http://linux-ha.org/
>
> _______________________________________________________
> Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
Re: Patch : slapd : Even if kill command fails in terminate, return success. [ In reply to ]
Hi Dejan

>> Can we also do a global replace s/result/rc/?
> OK,I contribute a patch again.
I made this patch, I attach it.

Regards,
Tomo

2012$BG/(B3$B7n(B30$BF|(B12:03 nozawat <nozawat@gmail.com>:
> Hi Dejan
>
> Thank you for your reply.
>> This patch doesn't look right. What if the first kill(1) fails
>> (because, say, the process just exited)? And if '$result' is -ne
>> 0, then the while loop will finish anyway.
> Yes,And output an error in an origin of summons and retry it.
> because kill repaid return 0 in the case of an error as for me, I made
> modifications to return 1 and output an error.
>
>> Anyway, the terminate function looks too complicated for what it
>> does.
> As for this correction, a logic is surely complicated.
> By the way, as for this correction, kill is effective when the error
> except the case without a process occurs. The situation did not hit on
> me.
>
>> Can we also do a global replace s/result/rc/?
> OK,I contribute a patch again.
>
> 2012$BG/(B3$B7n(B29$BF|(B22:35 Dejan Muhamedagic <dejan@suse.de>:
>> Hi Tomo,
>>
>> On Tue, Mar 27, 2012 at 10:27:36AM +0900, nozawat wrote:
>>> Hi
>>>
>>> Even if kill fails in terminate, return success.
>>> When kill fails, this is the patch which I revised to return an error
>>> definitely.
>>
>> This patch doesn't look right. What if the first kill(1) fails
>> (because, say, the process just exited)? And if '$result' is -ne
>> 0, then the while loop will finish anyway.
>>
>> Anyway, the terminate function looks too complicated for what it
>> does.
>>
>> Can we also do a global replace s/result/rc/?
>>
>> Cheers,
>>
>> Dejan
>>
>>> Regards,
>>> Tomo
>>
>>
>>> _______________________________________________________
>>> Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
>>> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
>>> Home Page: http://linux-ha.org/
>>
>> _______________________________________________________
>> Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
>> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
>> Home Page: http://linux-ha.org/
Re: Patch : slapd : Even if kill command fails in terminate, return success. [ In reply to ]
Hi Dejan

> This patch doesn't look right. What if the first kill(1) fails
> (because, say, the process just exited)? And if '$result' is -ne
> 0, then the while loop will finish anyway.
I surely feel good by the normal end when a process does not exist.
So I withdraw my patch.

Regards,
Tomo

On Thu, 29 Mar 2012 15:35:37 +0200
Dejan Muhamedagic <dejan@suse.de> wrote:

> Hi Tomo,
>
> On Tue, Mar 27, 2012 at 10:27:36AM +0900, nozawat wrote:
> > Hi
> >
> > Even if kill fails in terminate, return success.
> > When kill fails, this is the patch which I revised to return an error
> > definitely.
>
> This patch doesn't look right. What if the first kill(1) fails
> (because, say, the process just exited)? And if '$result' is -ne
> 0, then the while loop will finish anyway.
>
> Anyway, the terminate function looks too complicated for what it
> does.
>
> Can we also do a global replace s/result/rc/?
>
> Cheers,
>
> Dejan
>
> > Regards,
> > Tomo
>
>
> > _______________________________________________________
> > Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
> > http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> > Home Page: http://linux-ha.org/
>
> _______________________________________________________
> Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/

-----------------------------------------------------------
$B#N#T#T%G!<%?@hC<5;=Q3t<02q<R(B
$B%=%j%e!<%7%g%s;v6HIt(B OSS$B%=%j%e!<%7%g%s%S%8%M%9%f%K%C%H(B
$BLnBt(B $BCRLi(B
TEL:03-5843-6810
FAX:03-5843-6811
$B")(B104-0052
$B!!El5~ETCf1{6h7nEg(B1-15-7
$B!!%Q%7%U%#%C%/%^!<%/%97nEg(B 2F
-----------------------------------------------------------

_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/