Commit 2ab32715 authored by Gian Saß's avatar Gian Saß

Redirect bwrap stdout to null

parent da6e074f
......@@ -209,11 +209,13 @@ module JavaSubmissionTester
Rails.logger.info("Running: #{bwrap}")
stdout_string, stderr_string, status = Open3.capture3(bwrap) # => outputs to output_file
#stdout_string, stderr_string, status = Open3.capture3(bwrap) # => outputs to output_file
system(bwrap, out: File::NULL)
Rails.logger.info("Running returned: code: #{status}, out: #{stdout_string} err: #{stderr_string}")
#Rails.logger.info("Running returned: code: #{status}, out: #{stdout_string} err: #{stderr_string}")
Rails.logger.info("Running returned: code: #{$?.exitstatus}")
if status.exitstatus == 124
if $?.exitstatus == 124
result = 'Timeout exceeded'
else
result = JSON.load File.open(output_file,"r:UTF-8")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment