Skip to content

Commit 5c7c625

Browse files
authored
Fix: Exscript.util.sigint may raise exception #199
1 parent 8a90356 commit 5c7c625

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

Exscript/util/sigint.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,10 @@ def __init__(self):
5656
try:
5757
self.child = os.fork()
5858
except AttributeError: # platforms that don't have os.fork
59-
pass
60-
except RuntimeError:
61-
pass # prevent "not holding the import lock" on some systems.
62-
if self.child == 0:
63-
return
64-
else:
59+
self.child = 0
60+
except RuntimeError: # prevent "not holding the import lock" on some systems
61+
self.child = 0
62+
if self.child:
6563
self.watch()
6664

6765
def watch(self):

0 commit comments

Comments
 (0)