Using backticks ( `cmd`) hang child processes?

Hi All,

i execute small ruby code:

puts("in x\n")
      x = Thread.current
      y = Thread.start {
        i = 0;
        while (1)
          puts("in y #{i}\n")
          STDOUT.flush()
          i +=1;
        end
        puts("in y1\n")
        STDOUT.flush()

      }
     puts("in x1\n")
     STDOUT.flush()
# system("sleep 5")
     `sleep 5`

it seems that using `sleep 5` cause y thread to hang.
if i change in and remark `sleep 5` and unmark system command , it seems
to work just fine.

is it a bug?
is this is the righr behavior?
i'm using a little bit old version of ruby (1.8.2) but still, i didn't
find any post about this issue.

i'll happy to hear any comment about this issue.

Thanks,
Noam.

···

--
Posted via http://www.ruby-forum.com/.

any one? something?

···

--
Posted via http://www.ruby-forum.com/.

it's all over the archives. probably you are windows and it's a known issue. your option is to use systemu, for one.

are you on windows?

a @ http://codeforpeople.com/

···

On Oct 29, 2007, at 6:30 AM, Noam Noam wrote:

i'll happy to hear any comment about this issue.

--
it is not enough to be compassionate. you must act.
h.h. the 14th dalai lama

ara.t.howard wrote:

···

On Oct 29, 2007, at 6:30 AM, Noam Noam wrote:

are you on windows?

a @ http://codeforpeople.com/

i'm using cygwin.
where did you see this issue in the archives?
Thanks

Noam

--
Posted via http://www.ruby-forum.com/\.