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/bash_stdio_evaluator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'yaksh/bash_stdio_evaluator.py') diff --git a/yaksh/bash_stdio_evaluator.py b/yaksh/bash_stdio_evaluator.py index 334620d..1ce729a 100644 --- a/yaksh/bash_stdio_evaluator.py +++ b/yaksh/bash_stdio_evaluator.py @@ -49,7 +49,8 @@ class BashStdIOEvaluator(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