[ovs-dev] [PATCH 3/7] daemon: Fix behavior of read_pidfile() for our own pidfile.

Justin Pettit jpettit at nicira.com
Thu Sep 23 06:13:36 UTC 2010

On Sep 22, 2010, at 4:45 PM, Ben Pfaff wrote:

> Opening a file descriptor and then closing it always discards any locks
> held on the underlying file, even if the file is still open as another file
> descriptor.  This meant that calling read_pidfile() on the process's own
> pidfile would discard the lock and make other OVS processes think that the
> process had died.  This commit fixes the problem.

Nice catch!

> +    if ((pidfile_ino || pidfile_dev)

I'm guessing it's pretty unlikely that both the inode and device are 0.  :-)

Is this something we need to worry about in the equivalent Python functions?


More information about the dev mailing list