# Forking processes and writing to log file

**URL:** <https://www.ruby-forum.com/t/forking-processes-and-writing-to-log-file/70119>\
**Category:** Ruby\
**Created:** [September 26, 2006, 11:02pm UTC](https://www.ruby-forum.com/t/forking-processes-and-writing-to-log-file/70119 "2006-09-26T23:02:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![joe-dumoulin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9dc877/32.png) [@joe-dumoulin](https://www.ruby-forum.com/u/joe-dumoulin)\
**Post date:** [September 26, 2006, 11:02pm UTC](https://www.ruby-forum.com/t/forking-processes-and-writing-to-log-file/70119/1 "2006-09-26T23:02:04Z")

</div>

Hello,

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’.

If I background the main Ruby process, the writing to the log file  
seems to get halted as (I think) it’s waiting for terminal input  
(which it’s not):

$ ./the\_ruby\_program.rb &  
[1] + Suspended (tty input) ./the\_ruby\_program.rb

Any ideas?

Thanks,  
Joe

---

<div class="post-metadata">

**Author:** ![joe-dumoulin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9dc877/32.png) [@joe-dumoulin](https://www.ruby-forum.com/u/joe-dumoulin)\
**Post date:** [September 26, 2006, 11:10pm UTC](https://www.ruby-forum.com/t/forking-processes-and-writing-to-log-file/70119/2 "2006-09-26T23:10:05Z")

</div>

On 9/26/06, Joe Van D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hello,
> 
> 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.
