Flush PID file on unix as well

This commit is contained in:
Peter Šurda 2017-07-28 19:21:56 +02:00
parent e7382b7714
commit 3e6de7a9ad
Signed by: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

View File

@ -55,6 +55,7 @@ class singleinstance:
else: else:
pidLine = "%i\n" % self.lockPid pidLine = "%i\n" % self.lockPid
self.fd.write(pidLine) self.fd.write(pidLine)
self.fd.flush()
else: # non Windows else: # non Windows
self.fp = open(self.lockfile, 'w') self.fp = open(self.lockfile, 'w')
try: try: