Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

exec or spawning a tcl program using winXP START

29 views
Skip to first unread message

wookie

unread,
Aug 3, 2007, 6:02:57 AM8/3/07
to
Hi All,

I am trying to use expect to process debug trace coming in via a com
port. I have found that it works much better if I set the Base
Priority in windows task manager to REALTIME, but I need this to be an
automatic process so I am using the START command. Everything works
fine if I launch the program from a command line e.g.

C:\Temp>START /REALTIME /B /I tclsh foo.tcl

foo.tcl runs at REALTIME prioritry and outputs data to the console.
However when I try and put this into a spawn command I run into
problems e.g. in a file called test.tcl

package require Expect
spawn START /REALTIME /B /I tclsh foo.tcl

I get the error:
The system cannot find the file specified.
while executing
"spawn START /REALTIME /B /I tclsh foo.tcl"
(file "test.tcl" line 7)

If I do the same line with exec instead of spawn I get the error:
couldn't execute "START": no such file or directory
while executing
"exec START /REALTIME /B /I tclsh foo.tcl"
(file "test.tcl" line 7)

I can get the code to run if I launch START as part of a cmd call
(i.e. in the same way a batch file is called) e.g.

spawn cmd /C START /REALTIME /B /I tclsh foo.tcl

However this does not produce any output I'm gussing this is because
both START and CMD have created a shell and between them they are
swallowing all the output from foo.tcl.

Any help on changing the Base Priority of a spawned process from
within tcl will be greatfully recieved.

Thanks Wookie.

0 new messages