lockups spawning simple vbexpress program with tcl8.4 and expect 5.43



Hi folks,

I am having a problem running console program written in VBExpress.
(and VCExpress, etc.)

I am running tcl/tk v 8.4 and expect v. 5.43 on my windows xp pro box.

Here is a minimal program to spawn a task, count the lines output, and exit.

----------------------
package require Expect
console show
set timeout 5
set linecount 0
exp_spawn "cmd.exe"
sleep 2
send "dir\r"
expect {
"\n" {incr linecount 1; exp_continue}
timeout {send_user "timeout.\n"}
}
send_user "$linecount lines\n"
sleep 10
exp_close
exit
------------------------

It works fine when spawning cmd.exe and sending it the dir command.

But if I write a short console application in Visual Basic Express
(HelloConsole.vb):

------------------------------

Module HelloConsole
Sub Main()
Console.WriteLine("Hello, World!")
End Sub
End Module

---------------------------------------

And modify the program to spawn the exe file:

----------------------

package require Expect
console show
set timeout 10
set linecount 0
exp_spawn "HelloConsole.exe"
expect {
"\n" {incr linecount 1; exp_continue}
timeout {send_user "timeout.\n"}
}
send_user "$linecount lines\n";
sleep 10
exp_close
exit

------------------------



If I execute from command line with default association, (wish84)
I get copies of wish84.exe in my processes list of the task manager,
and when I log out, I get the shutdown messages (one for each time
I tried to start the program)

Ending Program - MenuWindow
with the "end now" button, I think you know what I mean.


---------------------

If I start a wish console and "source" the program it, it hangs
(AND CREATES another hung copy of wish and console.)


Anyone else see similar things with visual express console programs
and expect?

I tried the tips of dbghelp.dll and boot.ini and they don't seem to apply.

Rufus



.



Relevant Pages

  • Strange behavior of redirected stdout. Streams Broken?
    ... running a console application). ... - The interceptor starts the application directly. ... That's right -- no line after the Sleep is captured. ... gets any further characters on the output end of the pipe. ...
    (microsoft.public.dotnet.general)
  • Capturing stdout from a console app -- not working
    ... running a console application). ... - The interceptor starts the application directly. ... That's right -- no line after the Sleep is captured. ... gets any further characters on the output end of the pipe. ...
    (microsoft.public.dotnet.general)
  • Re: Sleep timer but still responsive?
    ... My app is purely console based. ... I've tried putting the sleep in another ... I know you're running 2.6.4, but don't know which version of Windows, so I'll guess XP. ...
    (comp.lang.python)
  • Re: How do I make a User login shutdown my box?
    ... > a shutdown of the box. ... > I've added a user called 'Sleep' and added this user to the root group ... allow users logged in on the console to ...
    (RedHat)
  • Re: Paging Champ
    ... Saab's ignitions are in the centre console under the handbrake. ... to sleep in the back of my old 900 Turbo when camping, ...
    (uk.rec.motorcycles)