Skip to content

Commit 6e716e2

Browse files
committed
Only for STDOUT
1 parent bf24aeb commit 6e716e2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/ruby/truffleruby/core/posix.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,9 @@ def self.write_string_native(io, string, continue_on_eagain)
446446
return written
447447
end
448448
else
449-
raise SignalException.new(:SIGPIPE) if errno == 32
449+
if errno == Errno::EPIPE::Errno && fd == 1
450+
raise SignalException, :SIGPIPE
451+
end
450452
Errno.handle_errno(errno)
451453
end
452454
end

0 commit comments

Comments
 (0)