@@ -125,21 +125,21 @@ def _kill_all(self, job):
125
125
job .f_stderr .close ()
126
126
job ._state = 'FAILURE'
127
127
128
- for child in children :
129
- # try to kill the children
130
- try :
131
- child .kill ()
132
- except (ProcessLookupError , PermissionError ,
133
- psutil .NoSuchProcess ):
134
- # The process group may already be dead or assigned
135
- # to a different group, so ignore this error
136
- self .log (f'child pid { child .pid } already dead' )
137
- else :
138
- # If the main process was terminated but the children
139
- # ignored the term signal, then the child are killed
140
- if job .proc .returncode :
141
- if job .proc .returncode == - 15 :
142
- job ._signal = signal .SIGKILL
128
+ # for child in children:
129
+ # # try to kill the children
130
+ # try:
131
+ # child.kill()
132
+ # except (ProcessLookupError, PermissionError,
133
+ # psutil.NoSuchProcess):
134
+ # # The process group may already be dead or assigned
135
+ # # to a different group, so ignore this error
136
+ # self.log(f'child pid {child.pid} already dead')
137
+ # else:
138
+ # # If the main process was terminated but the children
139
+ # # ignored the term signal, then the child are killed
140
+ # if job.proc.returncode:
141
+ # if job.proc.returncode == -15:
142
+ # job._signal = signal.SIGKILL
143
143
144
144
def _term_all (self , job ):
145
145
'''Send SIGTERM to all the processes of the spawned job.'''
@@ -154,15 +154,15 @@ def _term_all(self, job):
154
154
children = []
155
155
156
156
try :
157
- for child in children :
158
- try :
159
- child .terminate ()
160
- child .signal = signal .SIGTERM
161
- except (ProcessLookupError , PermissionError ,
162
- psutil .NoSuchProcess ):
163
- # The process group may already be dead or assigned
164
- # to a different group, so ignore this error
165
- self .log (f'child pid { child .pid } already dead' )
157
+ # for child in children:
158
+ # try:
159
+ # child.terminate()
160
+ # child.signal = signal.SIGTERM
161
+ # except (ProcessLookupError, PermissionError,
162
+ # psutil.NoSuchProcess):
163
+ # # The process group may already be dead or assigned
164
+ # # to a different group, so ignore this error
165
+ # self.log(f'child pid {child.pid} already dead')
166
166
os .kill (job .jobid , signal .SIGTERM )
167
167
job ._signal = signal .SIGTERM
168
168
except (ProcessLookupError , PermissionError ):
0 commit comments