diff options
author | adityacp | 2017-04-27 18:37:19 +0530 |
---|---|---|
committer | adityacp | 2017-04-27 18:37:19 +0530 |
commit | 624e752684125aa525d9b3643cbd7c9b7ba61682 (patch) | |
tree | 726da35ba55acacfde255e31bdc2233600f75395 /yaksh/hook_evaluator.py | |
parent | b191455c7d9b0f6c3548da174a68c8ab8052abf0 (diff) | |
parent | 2694fd6dd4d37a1a6570792e234998feef21edca (diff) | |
download | online_test-624e752684125aa525d9b3643cbd7c9b7ba61682.tar.gz online_test-624e752684125aa525d9b3643cbd7c9b7ba61682.tar.bz2 online_test-624e752684125aa525d9b3643cbd7c9b7ba61682.zip |
Remove conflicts from views after rebase
Diffstat (limited to 'yaksh/hook_evaluator.py')
-rw-r--r-- | yaksh/hook_evaluator.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/yaksh/hook_evaluator.py b/yaksh/hook_evaluator.py index 0819ec9..f5364d6 100644 --- a/yaksh/hook_evaluator.py +++ b/yaksh/hook_evaluator.py @@ -2,6 +2,8 @@ import sys import traceback import os +import signal +import psutil # Local imports from .file_utils import copy_files, delete_files @@ -65,10 +67,12 @@ class HookEvaluator(BaseEvaluator): check = hook_scope["check_answer"] success, err, mark_fraction = check(self.user_answer) except TimeoutException: + processes = psutil.Process(os.getpid()).children(recursive=True) + for process in processes: + process.kill() raise except Exception: msg = traceback.format_exc(limit=0) err = "Error in Hook code: {0}".format(msg) del tb return success, err, mark_fraction -
\ No newline at end of file |