Threads with shell scripts

hi all
i have some code which has a Queue class, and the queue needs to have a
QueueItem, whcih is a ruby thread.
The ruby thread invokes a system command, using IO.popen at the moment,
but doing something like:
t = Thread.new{IO.popen("/bin/sleep 60")}

always returns dead threads:
t.alive? => false

doing: t = Thread.new{/bin/sleep 60} ; t.alive? => true
is ok, but i’m worried that may lock the web front end to all users?
does anyone have advice for the best way to go about something like
this? The threads will be spawned by the models after validation.

thanks for your time.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs