# File lib/posix/spawn.rb, line 279 def `(cmd) r, w = IO.pipe command_and_args = system_command_prefixes + [cmd, {:out => w, r => :close}] pid = spawn(*command_and_args) if pid > 0 w.close out = r.read ::Process.waitpid(pid) out else '' end ensure [r, w].each{ |io| io.close rescue nil } end