From e2b741cb5f19b30bc785436a0d1842a9b28dcd0d Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Fri, 14 Jun 2013 14:47:30 -0400 Subject: [PATCH] Add newline at the end of the PID file This is standard for PID files elsewhere, and makes it behave better when inspecting the file manually. --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index da80a35..1b83d6a 100644 --- a/src/main.c +++ b/src/main.c @@ -546,7 +546,7 @@ static void write_pidfile(void) return; pid = getpid(); - snprintf(buf, sizeof(buf), "%u", (unsigned)pid); + snprintf(buf, sizeof(buf), "%u\n", (unsigned)pid); fd = open(cf_pidfile, O_WRONLY | O_CREAT | O_EXCL, 0644); if (fd < 0) -- 2.40.0