From: Joe Van Dyk Date: 2005-06-28T02:37:54+09:00 Subject: redirecting STDOUT Why doesn't this work? (#executable is a function that returns a string that contains a test application that spits out some data) def start pid = fork if pid.nil? # In child log = File.open(executable + ".log", "w") STDOUT.reopen(log) STDERR.reopen(log) exec executable # Start program exit else # In parent @pid = pid # Record new process id Process.detach @pid # If the process dies, let it die monitor # Start monitoring the process' status end end Well, it works for the most part. The log file gets created, but nothing gets written to it. Am I not redirecting output correctly? Thanks, Joe Thanks, Joe