Skip to content

Commit

Permalink
Check the ci tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Blanca-Fuentes committed Dec 10, 2024
1 parent d350275 commit b7188ba
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions reframe/core/schedulers/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,21 +125,21 @@ def _kill_all(self, job):
job.f_stderr.close()
job._state = 'FAILURE'

for child in children:
# try to kill the children
try:
child.kill()
except (ProcessLookupError, PermissionError,
psutil.NoSuchProcess):
# The process group may already be dead or assigned
# to a different group, so ignore this error
self.log(f'child pid {child.pid} already dead')
else:
# If the main process was terminated but the children
# ignored the term signal, then the child are killed
if job.proc.returncode:
if job.proc.returncode == -15:
job._signal = signal.SIGKILL
# for child in children:
# # try to kill the children
# try:
# child.kill()
# except (ProcessLookupError, PermissionError,
# psutil.NoSuchProcess):
# # The process group may already be dead or assigned
# # to a different group, so ignore this error
# self.log(f'child pid {child.pid} already dead')
# else:
# # If the main process was terminated but the children
# # ignored the term signal, then the child are killed
# if job.proc.returncode:
# if job.proc.returncode == -15:
# job._signal = signal.SIGKILL

def _term_all(self, job):
'''Send SIGTERM to all the processes of the spawned job.'''
Expand All @@ -154,15 +154,15 @@ def _term_all(self, job):
children = []

try:
for child in children:
try:
child.terminate()
child.signal = signal.SIGTERM
except (ProcessLookupError, PermissionError,
psutil.NoSuchProcess):
# The process group may already be dead or assigned
# to a different group, so ignore this error
self.log(f'child pid {child.pid} already dead')
# for child in children:
# try:
# child.terminate()
# child.signal = signal.SIGTERM
# except (ProcessLookupError, PermissionError,
# psutil.NoSuchProcess):
# # The process group may already be dead or assigned
# # to a different group, so ignore this error
# self.log(f'child pid {child.pid} already dead')
os.kill(job.jobid, signal.SIGTERM)
job._signal = signal.SIGTERM
except (ProcessLookupError, PermissionError):
Expand Down

0 comments on commit b7188ba

Please sign in to comment.