From 578c5dd49542b565578bec3b7c8836d624ffa81b Mon Sep 17 00:00:00 2001 From: Peter Surda Date: Sun, 6 Aug 2017 18:29:08 +0200 Subject: [PATCH] Fix windows PID file --- src/singleinstance.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/singleinstance.py b/src/singleinstance.py index 8a7fb68e..78a0cb33 100644 --- a/src/singleinstance.py +++ b/src/singleinstance.py @@ -54,8 +54,7 @@ class singleinstance: raise else: pidLine = "%i\n" % self.lockPid - self.fd.write(pidLine) - self.fd.flush() + os.write(self.fd, pidLine) else: # non Windows self.fp = open(self.lockfile, 'w') try: