From: Mark_Galeck on
Hello,

I have a script foobar.tcl on WinXP that uses Expect to spawn a
process, interact with it, and log everything using log_file

Now I need to extend it, so that it spawns 2 processes, and does the
same interaction with both (and logs each to its own log file). This
has to be done as if "in parallel" (I write in quotes because with 1
processor it is not strictly speaking possible).

I thought I would just do something like

exec [tclsh foobar.tcl 0]
exec [tclsh foobar.tcl 1]

but it seems I am not returning from the first call when I do it
interactively at tclsh prompt. So I think I must be confused here.
Please tell me the "proper" way to do this.

Mark
From: Mark_Galeck on

> Please tell me the "proper" way to do this.
>
> Mark

Oh I forgot, I just append &
>exec tclsh foobar.tcl 0 &
>exec tclsh foobar.tcl 1 &

I think this is the best way?
From: Neil Madden on
Mark_Galeck wrote:
>> Please tell me the "proper" way to do this.
>>
>> Mark
>
> Oh I forgot, I just append &
>> exec tclsh foobar.tcl 0 &
>> exec tclsh foobar.tcl 1 &
>
> I think this is the best way?

Yes. If the processes don't need to communicate with each other, then
this is by far the simplest approach.

-- Neil