On 8/23/22 16:19, Michal Prívozník wrote: > On 8/18/22 16:20, Martin Kletzander wrote: >> Just like the socket, remove the pidfile when TPM emulator is being stopped. In >> order to make this a bit cleaner, try to remove it even if swtpm_ioctl does not >> exist. >> >> Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx> >> --- >> src/qemu/qemu_tpm.c | 31 ++++++++++++++----------------- >> 1 file changed, 14 insertions(+), 17 deletions(-) >> What I forgot to mention is that qemuTPMEmulatorStop() which is called from qemuTPMEmulatorStart() can be removed, because if you accept my suggestion and go with virPidFileForceCleanupPath() there's no chance for the swtpm process to run at either the end of qemuTPMEmulatorStop() or at the time of qemuTPMEmulatorStart(). But that can be done in a follow up patch. Michal