Start test fixtures in new session to avoid propagating signals (i.e., Ctrl-C)
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import logging
|
import logging
|
||||||
|
import os
|
||||||
import re
|
import re
|
||||||
import select
|
import select
|
||||||
import subprocess
|
import subprocess
|
||||||
@@ -52,6 +53,7 @@ class SpawnedService(threading.Thread):
|
|||||||
|
|
||||||
self.child = subprocess.Popen(
|
self.child = subprocess.Popen(
|
||||||
self.args,
|
self.args,
|
||||||
|
preexec_fn=os.setsid, # to avoid propagating signals
|
||||||
env=self.env,
|
env=self.env,
|
||||||
bufsize=1,
|
bufsize=1,
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
|
Reference in New Issue
Block a user