2011/7/21 Eric Wong <normalperson / yhbt.net>: >> So I may change the default of :close_others to true even for system() and >> exec(). > > If so, I would like a way specify a set/array/hash of FDs/IOs we don't > want :close_others to automatically close on us. If you want to disable automatic close fd1, fd2, ..., use follows. h = { fd1 => fd1, fd2 => fd2, ... } system("command", h) system() (, exec(), IO.popen and spawn()) can take an option hash to specify fds to inherit to child process. See the manual of spawn() for details. -- Tanaka Akira