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

2018-03-20 Thread Eric Blake
On 03/20/2018 01:11 PM, Florian Larysch wrote: On Tue, Mar 20, 2018 at 01:00:40PM -0500, Eric Blake wrote: Here after the --- is a nice place to summarize how v3 differs from v2, to save reviewers some time. The triviality of the change didn't seem to warrant that, but in retrospect, I realize

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

2018-03-20 Thread Florian Larysch
On Tue, Mar 20, 2018 at 01:00:40PM -0500, Eric Blake wrote: > Here after the --- is a nice place to summarize how v3 differs from > v2, to save reviewers some time. The triviality of the change didn't seem to warrant that, but in retrospect, I realize that searching for the sole trivial change wh

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

2018-03-20 Thread Eric Blake
On 03/20/2018 12:33 PM, 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 v3] 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