diff --git a/offlineimap/init.py b/offlineimap/init.py index 3ff343e..8d2df12 100644 --- a/offlineimap/init.py +++ b/offlineimap/init.py @@ -102,6 +102,13 @@ def startup(versionno): lock(config, ui) + try: + pidfd = open(config.getmetadatadir() + "/pid", "w") + pidfd.write(os.getpid()) + pidfd.close() + except: + pass + try: if options.has_key('-l'): sys.stderr = ui.logfile