|
From: | Markus Armbruster |
Subject: | Re: [Qemu-devel] [PATCH v2] keep the PID file locked for the lifetime of the process |
Date: | Fri, 27 Jan 2012 15:48:00 +0100 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) |
Laszlo Ersek <address@hidden> 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 process > of any file descriptor for the file." > > Coverity may complain again about the leaked file descriptor; let's > worry about that later. > > v1->v2: > - add reference to 1bbd1592 > - explain the intentional fd leak in the source > > [1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/lockf.html > > Signed-off-by: Laszlo Ersek <address@hidden> Thanks for cleaning up the mess I made! Reviewed-by: Markus Armbruster <address@hidden>
[Prev in Thread] | Current Thread | [Next in Thread] |