aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2021-03-16 19:56:09 +0000
committerGravatar Joe Banks <[email protected]>2021-03-16 19:56:09 +0000
commit0e4d8fbcda1be32f524327f4b7d328793530dd82 (patch)
treede61ce395ca7777821e2d5dadb45493f9712d11d
parentRemove the mixed line endings pre-commit hook because it is obsolete. (diff)
Change SIGKILL to SIGTERM
-rw-r--r--snekbox/nsjail.py7
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)