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 untrusted user: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87
1 changed files with 5 additions and 1 deletions

View File

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