[Qemu-devel] [PATCH v2] keep the PID file locked for the lifetime of the process

2012-01-27 Thread Laszlo Ersek
The lockf() call in qemu_create_pidfile() aims at ensuring mutual exclusion. We shouldn't close the pidfile on success (as introduced by commit 1bbd1592), because that drops the lock as well [1]: "File locks shall be released on first close by the locking process of any file descriptor for

Re: [Qemu-devel] [PATCH v2] keep the PID file locked for the lifetime of the process

2012-02-03 Thread Anthony Liguori
On 01/27/2012 07:34 AM, Laszlo Ersek wrote: The lockf() call in qemu_create_pidfile() aims at ensuring mutual exclusion. We shouldn't close the pidfile on success (as introduced by commit 1bbd1592), because that drops the lock as well [1]: "File locks shall be released on first close by the

Re: [Qemu-devel] [PATCH v2] keep the PID file locked for the lifetime of the process

2012-01-27 Thread Markus Armbruster
Laszlo Ersek writes: > The lockf() call in qemu_create_pidfile() aims at ensuring mutual > exclusion. We shouldn't close the pidfile on success (as introduced by > commit 1bbd1592), because that drops the lock as well [1]: > > "File locks shall be released on first close by the locking proces