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

Ben Pfaff blp at nicira.com
Fri Aug 1 00:19:12 UTC 2014

On Wed, Jul 30, 2014 at 02:22:50PM +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.
> Signed-off-by: Chunhe Li <lichunhe at huawei.com>
> Signed-off-by: wuyunfei <wuyunfei at huawei.com>

Does this solve a problem you observed in practice?

There are at least two other ways that one could verify that the pid is
actually the process we expect.  One is to look at /proc/$pid/comm or
/proc/$pid/exe.  The other is to verify that the process holds the lock
on the pidfile (which all OVS daemons do).  These approaches might be
more reliable than "pidof": instead of checking that some process with
the given name exists, they check attributes of that particular process.

What are your thoughts?

More information about the dev mailing list