Joe Van D. wrote:
On 9/26/06, Joe Van D. [email protected] wrote:
So, on linux, I’m forking a new Ruby process. I redirect stdout and
stderr into a file and then I execute another program via ‘system’.
I should probably mention that the other program that’s being executed
is rsh, which executes a command on a different machine.
You either did not redirect stdout/stderr to a file properly, or
something you execute tries to output directly to the controlling
terminal (/dev/tty). You can disassosiate your spawned process from a
controlling terminal, just to be sure (not with ‘system’ though):
logfile = “my_log_file.log”
pid = fork do
File.open(logfile, ‘w’) do |_io|
Process.setsess # In this scenario disassociates the controlling
# terminal until another tty device is open (will
# become new controlling tty).