From: Mark_Galeck on 3 Sep 2009 19:33 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 3 Sep 2009 19:59 > 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 4 Sep 2009 12:30 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
|
Pages: 1 Prev: regexp Next: Possible bug in Tcl or Windows or Tcl on Windows |