Skip to content

Commit 9d6b7a7

Browse files
author
botheis
committed
(pid) add the kiosk pid on a pid file
On windows the pid file is c:\tmp\kiosk.pid On others OS the pid file is /tmp/kiosk.pid
1 parent f70fae9 commit 9d6b7a7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

kiosk_interface/__init__.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,15 @@ def __init__(self):
7171
self.datasdir = os.path.join(self.rootdir, "datas")
7272
self.viewsdir = os.path.join(self.rootdir, "views")
7373

74+
if sys.platform.startswith("win"):
75+
pidfile = os.path.join("C:\\", "tmp", "kiosk.pid")
76+
else:
77+
pidfile = os.path.join("/", "tmp", "kiosk.pid")
78+
79+
with open(pidfile, "w") as pidfb:
80+
pidfb.write("%s"%os.getpid())
81+
pidfb.close()
82+
7483
# Notify the application when something is happening
7584
self.notifier = Notifier()
7685
# Action launched when the kiosk emit a notification

0 commit comments

Comments
 (0)