mercurial/commands.py
changeset 2570 83cfd95eafb5
parent 2567 2748253b49c2
child 2572 b13a98bd078e
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -2649,7 +2649,7 @@ def serve(ui, repo, **opts):
 
     if opts['pid_file']:
         fp = open(opts['pid_file'], 'w')
-        fp.write(str(os.getpid()))
+        fp.write(str(os.getpid()) + '\n')
         fp.close()
 
     if opts['daemon_pipefds']: