Description:
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
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r70:347e4eeef742 - - 1 file changed: 8 inserted, 3 deleted

@@ -128,6 +128,14
128 #set loggin environment
128 #set loggin environment
129 ENV['GRADER_LOGGING'] = log_file_name
129 ENV['GRADER_LOGGING'] = log_file_name
130
130
131 + # register exit handler to report inactive, and terminated
132 + at_exit do
133 + if grader_proc!=nil
134 + grader_proc.report_inactive
135 + grader_proc.terminate
136 + end
137 + end
138 +
131 #
139 #
132 # MAIN LOOP
140 # MAIN LOOP
133 #
141 #
@@ -207,6 +215,3
207 exit(0)
215 exit(0)
208 end
216 end
209
217
210 - # report inactive
211 - grader_proc.report_inactive if grader_proc!=nil
212 -
You need to be logged in to leave comments. Login now