9a55fc506d (master): [ruby/rubygems] Close stdin immediately when using popen2e

0 views
Skip to first unread message

Randy Stauner

unread,
May 14, 2026, 5:18:26 PM (11 days ago) May 14
to ruby...@g.ruby-lang.org
Randy Stauner 2026-05-12 18:43:52 +0000 (Tue, 12 May 2026)

New Revision: 9a55fc506d

https://github.com/ruby/ruby/commit/9a55fc506d

Log:
[ruby/rubygems] Close stdin immediately when using popen2e

It's good hygiene to close the stdin pipe as soon as you are done writing to it.

This can happen for example if "ruby extconf.rb" spawns another
process (for example "cargo build", which may spawn arbitrary commands
to fetch credentials) and any of those subprocesses attempt to read
STDIN until it is closed.

We can close it as soon as it's created since we aren't writing to it at all.

https://github.com/ruby/rubygems/commit/ab09bfdf10

Modified files:
lib/rubygems/ext/builder.rb
test/rubygems/test_gem_ext_builder.rb
Reply all
Reply to author
Forward
0 new messages