KIlling a process inside a thread

I have

    @child_thread = Thread.new do
      # puts "#{__FILE__} @ #{__LINE__} #{Time.now}"

      stdout = `#{the_command}`
      @child_thread_return_status = $?
    end

and later

    #child_thread.kill

This apearrs to kill the thread but not the command surrounded by the back tick.

How do I kill the comand that is the backticked executable?

You probably better use IO.popen then which gives you access to the
child's PID. You'll also need to handle the output returned from the
process differently depending on timeout or not timeout.

Kind regards

robert

···

2010/9/1 Ralph Shnelvar <ralphs@dos32.com>:

I have

@child_thread = Thread.new do
# puts "#{__FILE__} @ #{__LINE__} #{Time.now}"

 stdout = \`\#\{the\_command\}\`
 @child\_thread\_return\_status = $?

end

and later

#child_thread.kill

This apearrs to kill the thread but not the command surrounded by the back tick.

How do I kill the comand that is the backticked executable?

--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/