]> granicus.if.org Git - pgbouncer/commitdiff
Add newline at the end of the PID file
authorPeter Eisentraut <peter@eisentraut.org>
Fri, 14 Jun 2013 18:47:30 +0000 (14:47 -0400)
committerPeter Eisentraut <peter@eisentraut.org>
Fri, 14 Jun 2013 18:47:30 +0000 (14:47 -0400)
This is standard for PID files elsewhere, and makes it behave better
when inspecting the file manually.

src/main.c

index da80a35b843833f58422a25969b3a5991277e8f1..1b83d6a470116a18fb82c3a914635cc1ecbec8fc 100644 (file)
@@ -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)