]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virpidfile: Add virPidFileReadPathIfLocked func
authorVasiliy Ulyanov <vulyanov@suse.de>
Wed, 2 Feb 2022 16:28:15 +0000 (17:28 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 4 Feb 2022 09:27:30 +0000 (10:27 +0100)
commit013ab22f79d1345daf6b2778ca498acb16939011
treed54a65a0a875b72855ff336cf82687d6c08a577e
parent5c0125b4f8f3a9ca13d345225108d2023d3c44df
virpidfile: Add virPidFileReadPathIfLocked func

The function will attempt to read a pid from @path, and store it in
@pid. The @pid will only be set, however, if @path is locked by
virFileLock() at byte 0 and the pid in @path is running.

Signed-off-by: Vasiliy Ulyanov <vulyanov@suse.de>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/libvirt_private.syms
src/util/virpidfile.c
src/util/virpidfile.h