[ovs-dev] [PATCH v2] ovs-lib.in:Add process name checking when start ovs service

Lichunhe lichunhe at huawei.com
Wed Aug 6 05:48:03 UTC 2014


>-----Original Message-----
>From: Ben Pfaff [mailto:blp at nicira.com]
>Sent: Wednesday, August 06, 2014 4:52 AM
>To: Lichunhe
>Cc: dev at openvswitch.org; Qianhuibin (Huibin QIAN, Euler); Wuyunfei
>Subject: Re: [PATCH v2] ovs-lib.in:Add process name checking when start ovs
>service
>
>On Mon, Aug 04, 2014 at 03:19:16PM +0800, lichunhe at huawei.com wrote:
>> From: Chunhe Li <lichunhe at huawei.com>
>>
>> Only check wheather is daemon pid exist is not enough, becasue the pid
>> which store in pidfile maybe assign to another process by OS.
>> So it will checking failed for pid exist, but the starting process
>> which own the pid is not the ovs daemon.
>>
>
>The changes from the previous version should be put after the --- so
>that they do not make it into the change log:
>> patch v2:
>> using /proc/$pid/comm check process name, instead of pidof.
>>
>> Signed-off-by: Chunhe Li <lichunhe at huawei.com>
>> Signed-off-by: Wunyunfei <wuyunfei at huawei.com>
>> Signed-off-by: Ben Pfaff <blp at nicira.com>
>
>Thanks for v2.
>
>Why is there a sign-off by Wunyunfei <wuyunfei at huawei.com>?  (How did
>this person contribute?)
>

He reported this bug, and written the first patch. Should I don't use singed off, instead of reported by.

>I believe that this:
>> +pid_comm_check () {
>> +    if [ "$1" = "`cat /proc/$2/comm`" ]; then
>> +        return 0
>> +    fi
>> +
>> +    return 1
>> +}
>can simply be written:
>    pid_comm_check () {
>        [ "$1" = "`cat /proc/$2/comm`" ]
>    }

OK, I send the v3 as soon as possible.



More information about the dev mailing list