From: Lars H. <Lar...@re...> - 2011-04-01 16:19:23
|
Arnulf Wiedemann skrev 2011-04-01 09.04: > Hello Miachal, > sounds good from my point of view too. I agree on all what you have > written down. Did not have to much time to think about it, as payed work > is waiting. > > I would say: go ahead in that direction and let us see what Lars is > answering, because I am interested on how he is doing that in detail, > for learning how we can use a modified part in our project. The code I mentioned can now be found at http://wiki.tcl.tk/28182. Useful reading is also http://abel.math.umu.se/~lars/tcl/hubs.pdf, but bear in mind that the scope of the problem that it set out to address is somewhat larger than just controlling a child tclsh, so there are a lot of issues considered that you're probably not so interested in. For a first experiment, you might want to try something like the following: % hubs::interp::local_spawn my -prog tclsh8.4 -shake 1 Hello, I'm nova.local 19741 /usr/bin/tclsh8.4 8.4.19 ::my::slave % ::my::slave eval {array get tcl_platform} osVersion 10.6.0 byteOrder littleEndian tip,268 1 threaded 1 machine i386 platform unix os Darwin tip,280 1 user lars wordSize 4 % exec ps -p 19741 PID TT STAT TIME COMMAND 19741 ?? S 0:00.10 tclsh8.4 % ::my::slave exit % exec ps -p 19741 Error: PID TT STAT TIME COMMAND child process exited abnormally % (ps exits with a nonzero status, since the process 19741 wasn't around anymore.) Lars Hellström |