From: Eric Wong Date: 2018-08-15T18:54:24+00:00 Subject: [ruby-core:88497] Re: [Ruby trunk Misc#14907] [PATCH] io.c: do not close inherited FDs by default I wrote: > OK, I'll commit 0001-process.c-close_others-defaults-to-false.patch Nevermind, the version I uploaded here also introduces compatibility problems around make jobserver FD inheritance with rubyspec. So setting FD_CLOEXEC on IO.for_fd still introduces incompatibilities. So either I need to make changes to test/lib/test/unit.rb or I make changes to spec/default.mspec (for spec/ruby/optional/capi/spec_helper.rb) Or we continue to suffer with the problem which caused me to proposed this patch in the first place. Anyways, this version which ONLY defaults "close_others: false" and makes no change to IO.for_fd is likely the safest: https://80x24.org/spew/20180815182638.8286-1-e@80x24.org/raw But I still hate having to make the change to test/lib/test/unit.rb, because this has a chance of breaking other 3rd-party code: ``` diff --git a/test/lib/test/unit.rb b/test/lib/test/unit.rb index 51c8960c52..7a09466d1c 100644 --- a/test/lib/test/unit.rb +++ b/test/lib/test/unit.rb @@ -145,6 +145,8 @@ def non_options(files, options) r.close if r nil else + r.close_on_exec = true + w.close_on_exec = true @jobserver = [r, w] options[:parallel] ||= 1 end ``` Damned if we do, damned if we don't... Unsubscribe: