diff options
author | 2021-03-16 19:56:09 +0000 | |
---|---|---|
committer | 2021-03-16 19:56:09 +0000 | |
commit | 0e4d8fbcda1be32f524327f4b7d328793530dd82 (patch) | |
tree | de61ce395ca7777821e2d5dadb45493f9712d11d | |
parent | Remove the mixed line endings pre-commit hook because it is obsolete. (diff) |
Change SIGKILL to SIGTERM
-rw-r--r-- | snekbox/nsjail.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/snekbox/nsjail.py b/snekbox/nsjail.py index c7087ad..4a13adb 100644 --- a/snekbox/nsjail.py +++ b/snekbox/nsjail.py @@ -163,9 +163,10 @@ class NsJail: output.append(chars) if output_size > OUTPUT_MAX: - # Terminate the NsJail subprocess with SIGKILL. - log.info("Output exceeded the output limit, sending SIGKILL to NsJail.") - nsjail.kill() + # Terminate the NsJail subprocess with SIGTERM. + # This in turn reaps and kills children with SIGKILL. + log.info("Output exceeded the output limit, sending SIGTERM to NsJail.") + nsjail.terminate() break return "".join(output) |