mirror of
https://github.com/ValveSoftware/GameNetworkingSockets.git
synced 2026-05-29 16:20:34 +00:00
test_p2p : make the RunProcessInThread a daemon thread so we cleanly exit on error.
This commit is contained in:
committed by
Fletcher Dunn
parent
0b62728bed
commit
df66222626
@@ -19,6 +19,7 @@ class RunProcessInThread(threading.Thread):
|
||||
|
||||
def __init__( self, tag, cmdline, env, **popen_kwargs ):
|
||||
threading.Thread.__init__( self, name=tag )
|
||||
self.daemon = True
|
||||
self.tag = tag
|
||||
self.cmdline = cmdline
|
||||
if env:
|
||||
@@ -63,6 +64,7 @@ class RunProcessInThread(threading.Thread):
|
||||
threading.Thread.join( self, timeout )
|
||||
if self.isAlive():
|
||||
self.WriteLn( "Still running after %d seconds. Killing" % timeout )
|
||||
global g_failed
|
||||
g_failed = True
|
||||
self.process.kill()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user