# HG changeset patch # User jittat # Date 2009-04-26 13:45:02 # Node ID 347e4eeef742db70dba00364e60b0632200b1f5f # Parent 523549228b8d4fb252bb5d1fc1a3d033ab799cae added termination reporting to grader (using at_exit) git-svn-id: http://theory.cpe.ku.ac.th/grader/judge/trunk/scripts@377 6386c4cd-e34a-4fa8-8920-d93eb39b512e diff --git a/grader b/grader --- a/grader +++ b/grader @@ -128,6 +128,14 @@ #set loggin environment ENV['GRADER_LOGGING'] = log_file_name +# register exit handler to report inactive, and terminated +at_exit do + if grader_proc!=nil + grader_proc.report_inactive + grader_proc.terminate + end +end + # # MAIN LOOP # @@ -207,6 +215,3 @@ exit(0) end -# report inactive -grader_proc.report_inactive if grader_proc!=nil -