Show a localized message if the program was killed.

* This will most likely happen by the OOM killer, thus we inform the user about the memory restriction.
This commit is contained in:
Sebastian Serth
2022-04-15 21:29:55 +02:00
parent 5f7838ef46
commit 19bd742bc9
10 changed files with 37 additions and 7 deletions

View File

@ -157,6 +157,7 @@ class SubmissionsController < ApplicationController
"\n#{t('exercises.implement.exit_failure', timestamp: l(Time.zone.now, format: :short), exit_code: exit_code)}"
end
client_socket.send_data JSON.dump({cmd: :write, stream: :stdout, data: "#{exit_statement}\n"})
client_socket.send_data JSON.dump({cmd: :out_of_memory}) if exit_code == 137
close_client_connection(client_socket)
end