Setsid is not available on Windows

- wrap an error handler around it
This commit is contained in:
Peter Šurda 2017-07-28 09:19:53 +02:00
parent 20cbac9752
commit 501f07dd34
Signed by: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

View File

@ -325,7 +325,11 @@ class Main:
else: else:
shared.thisapp.lock() # relock shared.thisapp.lock() # relock
os.umask(0) os.umask(0)
os.setsid() try:
os.setsid()
except AttributeError:
# setsid not implemented
pass
try: try:
if os.fork(): if os.fork():
exit(0) exit(0)