[ruby-cvs:71491] normal:r64399 (trunk): process.c: defaults to close_others false

normal at ruby-lang.org normal at ruby-lang.org
Fri Aug 17 08:56:08 JST 2018


normal	2018-08-17 08:56:08 +0900 (Fri, 17 Aug 2018)

  New Revision: 64399

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64399

  Log:
    process.c: defaults to close_others false
    
    Arbitrarily closing file descriptors on exec breaks use cases
    where a Ruby process sets up a descriptor for non-Ruby children
    to use.  For example, the "rake foo" target may spawn any number
    of subprocesses (Ruby or not) which depends on parsing the "FOO"
    environment variable for out_fd:99 and writing to foo.out
    
        FOO=out_fd:99 rake foo 99>>foo.out
    
    Unfortunately, this introduced one incompatibility in
    test/lib/test/unit.rb and it now requires explicitly setting
    IO#close_on_exec=true
    
    [ruby-core:88007] [Misc #14907]

  Modified files:
    trunk/process.c
    trunk/test/lib/test/unit.rb
    trunk/test/ruby/test_process.rb


More information about the ruby-cvs mailing list