Record process pid in a file

darcs-hash:20060206194233-86b55-2575e8b5a9bca31f46e81f19a648846eddabb210.gz
This commit is contained in:
David Rousselie
2006-02-06 20:42:33 +01:00
parent e5e80b2b0a
commit 81b79d0e36
3 changed files with 5 additions and 0 deletions

3
jmc.py
View File

@@ -47,6 +47,9 @@ def main(config_file = "jmc.xml", isDebug = 0):
str(sys.exc_value)
sys.exit(1)
pidfile = open(config.get_content("config/pidfile"), "w")
pidfile.write(str(os.getpid()))
pidfile.close()
mailconnection.default_encoding = config.get_content("config/mail_default_encoding")
print "creating component..."
mailcomp = MailComponent(config.get_content("config/jabber/service"), \