From: Paul Brook <paul@codesourcery.com>
To: qemu-devel@nongnu.org
Cc: Jim Bailey <dgym.bailey@gmail.com>
Subject: Re: [Qemu-devel] bug writing pidfile under unix (and fix)
Date: Fri, 7 Nov 2008 18:56:11 +0100 [thread overview]
Message-ID: <200811071756.12371.paul@codesourcery.com> (raw)
In-Reply-To: <20081107170215.7ca43a08@dgym.ktulu>
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
next prev parent reply other threads:[~2008-11-07 17:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-07 17:02 [Qemu-devel] bug writing pidfile under unix (and fix) Jim Bailey
2008-11-07 17:56 ` Paul Brook [this message]
2008-11-07 18:08 ` Jim Bailey
2008-11-07 20:15 ` Anthony Liguori
2008-11-07 20:33 ` Jim Bailey
2008-11-11 21:05 ` Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200811071756.12371.paul@codesourcery.com \
--to=paul@codesourcery.com \
--cc=dgym.bailey@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.