File tree Expand file tree Collapse file tree 1 file changed +1
-15
lines changed Expand file tree Collapse file tree 1 file changed +1
-15
lines changed Original file line number Diff line number Diff line change @@ -140,26 +140,12 @@ def signal_handler(signum: int, frame: Any) -> None:
140140 Forward kill signals to children.
141141
142142 When we receive a signal, send it to the entire process group of the child.
143- If that doesn't work, SIGKILL them then exit.
144143 """
145144 # Send the signal to the child's entire process group
146145 if process .poll () is None :
147146 os .killpg (os .getpgid (process .pid ), signum )
148147
149- # Give some time for the child to terminate
150- for _ in range (10 ): # Wait up to 1 second
151- if process .poll () is not None :
152- break
153- time .sleep (0.1 )
154-
155- # If the child is still running, force kill it
156- if process .poll () is None :
157- try :
158- os .killpg (os .getpgid (process .pid ), signal .SIGKILL )
159- except Exception :
160- pass
161-
162- # Exit immediately
148+ # Exit
163149 os ._exit (process .returncode if process .returncode is not None else 1 )
164150
165151 # Configure the single handler only on Unix-like systems.
You can’t perform that action at this time.
0 commit comments