We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 857d7fb commit 5da207bCopy full SHA for 5da207b
src/main/ruby/truffleruby/core/post.rb
@@ -60,11 +60,17 @@ def external_encoding
60
STDERR.sync = true
61
62
# Always flush standard streams on exit
63
-Truffle::KernelOperations.at_exit true do
+Truffle::KernelOperations.at_exit(true) do
64
STDOUT.flush
65
+rescue Errno::EPIPE
66
+ # Could not write to STDOUT, the calling process closed the pipe
67
+ nil
68
end
69
70
STDERR.flush
71
72
+ # Could not write to STDERR, the calling process closed the pipe
73
74
75
76
module Truffle
0 commit comments