From a9d7b48b6a5a79bf619500463d89f03e8ca1b7bb Mon Sep 17 00:00:00 2001 From: mahesh Date: Tue, 4 Apr 2017 13:00:41 +0530 Subject: Kills stray processes in code, hook and stdio evaluator --- yaksh/cpp_stdio_evaluator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'yaksh/cpp_stdio_evaluator.py') diff --git a/yaksh/cpp_stdio_evaluator.py b/yaksh/cpp_stdio_evaluator.py index b302fa4..d211bb7 100644 --- a/yaksh/cpp_stdio_evaluator.py +++ b/yaksh/cpp_stdio_evaluator.py @@ -82,7 +82,8 @@ class CppStdIOEvaluator(StdIOEvaluator): shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, - stderr=subprocess.PIPE + stderr=subprocess.PIPE, + preexec_fn=os.setpgrp ) success, err = self.evaluate_stdio(self.user_answer, proc, self.expected_input, -- cgit