From: Luiz Capitulino <lcapitulino@redhat.com>
To: mdroth@linux.vnet.ibm.com
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH] qemu-ga: ga_open_pidfile(): add new line to pidfile
Date: Wed, 3 Oct 2012 14:25:41 -0300 [thread overview]
Message-ID: <20121003142541.1d5b998d@doriath.home> (raw)
FHS dictates that pid files should end with a new line.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
qemu-ga.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qemu-ga.c b/qemu-ga.c
index b747470..afd685e 100644
--- a/qemu-ga.c
+++ b/qemu-ga.c
@@ -255,7 +255,7 @@ static bool ga_open_pidfile(const char *pidfile)
g_critical("Failed to truncate pid file");
goto fail;
}
- sprintf(pidstr, "%d", getpid());
+ sprintf(pidstr, "%d\n", getpid());
if (write(pidfd, pidstr, strlen(pidstr)) != strlen(pidstr)) {
g_critical("Failed to write pid file");
goto fail;
--
1.7.12.315.g682ce8b
next reply other threads:[~2012-10-03 17:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-03 17:25 Luiz Capitulino [this message]
2012-10-03 20:24 ` [Qemu-devel] [PATCH] qemu-ga: ga_open_pidfile(): add new line to pidfile Blue Swirl
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=20121003142541.1d5b998d@doriath.home \
--to=lcapitulino@redhat.com \
--cc=mdroth@linux.vnet.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).