qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] qemu-ga: ga_open_pidfile(): add new line to pidfile


From: Luiz Capitulino
Subject: [Qemu-devel] [PATCH] qemu-ga: ga_open_pidfile(): add new line to pidfile
Date: Wed, 3 Oct 2012 14:25:41 -0300

FHS dictates that pid files should end with a new line.

Signed-off-by: Luiz Capitulino <address@hidden>
---
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]