> -----Original Message-----
> From: Aristarkh A Zagorodnikov [mailto:xm / w3d.ru]
> Sent: Thursday, January 18, 2001 11:23 AM
> To: ruby-talk ML
> Subject: [ruby-talk:9497] Re: Subprocess
>
>
> > -----Original Message-----
> > From: Bostjan JERKO [mailto:Bostjan.Jerko / socgen.com]
> > Sent: Thursday, January 18, 2001 11:01 AM
> > To: ruby-talk ML
> > Subject: [ruby-talk:9496] Re: Subprocess
> >
> >
> > Yeah and what if I want to run it on M$ ?
> > I don't think a fork will do there - spoon would be beter :-)
> Hmmm ... ruby threads are platform-independent.
> Also, remember - there is no spoon ;)
> Yeah, fork is not implemented currently.
> Though in ruby process context it maybe done by saving current object
> space and state and then spawning new process, transferring it this
> information.
> Though, I am pretty sure there is a simpler method to spawn a process...
> You may use %x() (or backticks or %x//) for it. Though you have to idle
> for that time - but that's easily solved with isolated thread.
Also ... final thoughts - ruby may block thread execution while performing
external commands - should test. Please tell me when you've got a solution:
I am a bit interested in that too.

Also a small question - if not holy war provocation: what is clearer ?
	var = []
or
	var = Array.new

same for
	var = {}
or
	var = Hash.new

Former is shorter ... but latter expresses OO better - and just makes code
look
more consistent ... or cool ;) What do you think about that ?

> > On 18.01.2001 08:55:00 AM xm wrote:
> >
> > >Yeah ... learn UNIX. It's fork-exec stuff.
> > >First, you fork current process which makes a copy of your process in
> > >memory.
> > >Then, for one of you processes (for which fork() returned 0),
> > you call exec.
> > >Also, when using ruby, threads are a more viable option
> > sometimes. They are
> > >faster to start, and easier to interact and control.


Aristarkh A Zagorodnikov, W3D Group
http://www.w3d.ru /// xm / w3d.ru /// ICQ UIN 36987938