From: ahoward Date: 2002-11-15T10:41:48+09:00 Subject: Re: Problem writing to file after closing $stdout & $stderr On 14 Nov 2002, Eric Schwartz wrote: > So I have a program now that starts off tests on remote machines, and > is supposed to fork itself off, wait for the tests to finish, and > fetch their logfiles back to the server. [snip] perhaps something in the parent is writing to stderr/out? i ask because this works fine for me def close $stderr.close $stdout.close $stdin.close end def method fork do f = File.open 'forkout', 'w' f.puts Time.now close #$stdout.puts 'foobar' f.puts Time.now f.close end end method Process.wait *unless* i uncomment the line writing to $stdout, in which case i get the behaviour you define too. -a -- ==================================== | Ara Howard | NOAA Forecast Systems Laboratory | Information and Technology Services | Data Systems Group | R/FST 325 Broadway | Boulder, CO 80305-3328 | Email: ahoward@fsl.noaa.gov | Phone: 303-497-7238 | Fax: 303-497-7259 ====================================