Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Workaround for Process.spawn not auto-closing fds

  • Loading branch information...
commit a77e4f5cc4853a143c2a2fbf1780323a86e22688 1 parent 2bd49f5
@jfirebaugh jfirebaugh authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  lib/19/open3.rb
View
1  lib/19/open3.rb
@@ -199,6 +199,7 @@ def popen2e(*cmd, &block)
module_function :popen2e
def popen_run(cmd, opts, child_io, parent_io) # :nodoc:
+ parent_io.each {|io| io.close_on_exec = true }
pid = spawn(*cmd, opts)
wait_thr = Process.detach(pid)
child_io.each {|io| io.close }
Please sign in to comment.
Something went wrong with that request. Please try again.