Re: [Qemu-devel] [PATCH v2] os: truncate pidfile on creation

2018-03-20 Thread Eric Blake
On 03/20/2018 11:58 AM, Florian Larysch wrote: qemu_create_pidfile does not truncate the pidfile when it creates it, but rather overwrites its contents with the new pid. This works fine as long as the length of the pid doesn't decrease, but this might happen in case of wraparounds, causing pidfil

[Qemu-devel] [PATCH v2] os: truncate pidfile on creation

2018-03-20 Thread Florian Larysch
qemu_create_pidfile does not truncate the pidfile when it creates it, but rather overwrites its contents with the new pid. This works fine as long as the length of the pid doesn't decrease, but this might happen in case of wraparounds, causing pidfiles to contain trailing garbage which breaks opera