----- Original Message ----- 
From: "Kurt M. Dresner" <kdresner / cs.utexas.edu>
To: "ruby-talk ML" <ruby-talk / ruby-lang.org>
Sent: Saturday, August 16, 2003 1:12 PM
Subject: spawning a process


> Hi,
> 
> I'm looking through the Ruby documentation and I'm trying to find an
> equivalent to the Python: "pid = os.spawnv(os.P_NOWAIT, program, args)".
> 
> I want to play a sound file in a new process, but I want the ability to
> terminate, stop, and continue this process from the file I am in.
> 
> Any suggestions?

I suppose that depends in part on what OS you're on
and how the sound player exposes its controls.

If you're on Linux or the equivalent, fork and pipe
will work. There's also exec and so on. Don't think 
these work on Windows.

You might look into wrapping the sound player in a
drb server that you can then invoke from anywhere.

Hal

--
Hal Fulton
hal9000 / hypermetrics.com