Fix a bug preventing the pid file from being empty.

Convert os.getpid() to a string before writing it to the pid file in
order to avoid generating an empty pid file.
This commit is contained in:
Ben Willard 2008-08-07 21:16:36 -04:00 committed by John Goerzen
parent b267fd25a6
commit 04a6270058

View File

@ -133,7 +133,7 @@ def startup(versionno):
try:
pidfd = open(config.getmetadatadir() + "/pid", "w")
pidfd.write(os.getpid())
pidfd.write(str(os.getpid()) + "\n")
pidfd.close()
except:
pass