[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] bug writing pidfile under unix (and fix)
From: |
Paul Brook |
Subject: |
Re: [Qemu-devel] bug writing pidfile under unix (and fix) |
Date: |
Fri, 7 Nov 2008 18:56:11 +0100 |
User-agent: |
KMail/1.9.9 |
On Friday 07 November 2008, Jim Bailey wrote:
> Hello,
>
> In qemu_create_pidfile (osdep.c:229) the current pid and a newline is
> written to the pidfile. However, the pidfile isn't truncated, so if it
> is longer than the length of the pid and the newline character you get
> trailing junk that can really mess up scripts.
Shouldn't we just open with O_TRUNC ?
I also notice that we're not removing the file when we exit.
Paul