I have a Tcl script that uses Expect for Windows that works fine under Windows XP but doesn't work under Windows Server 2003 R2 SP2.
I can spawn a procss but when I try to close it using exp_close it doesn't close and using exp_wait hangs the script. I can't even kill the proces using Windows Task Manager at this point.
If I use exp_wait -nowait instead then the script doesn't hang but the process isn't closed either which will cause me to run out of memory eventually.
I using Tcl/Tk version 8.5.6 and Expect version 5.43 (got all the latest versions from the web site and using teacup).
I would be thankful for any suggestions on what to try or how to fix this!
Are you hitting the DEP (Data Execution Prevention) issues noted in the expect mailing list? It sounds possible. Please check out the archives for details on how to get around that.
I tried your suggestion and disabled DEP and rebooted the computer with no effect on the problem. The exp_close command still doesn’t close the spawned process and the exp_wait command still hangs the system. The problem is very repeatable.
I also tried running the same script on a different Windows Server 2003 computer system and the script behaves the same way there (process doesn’t close and system hangs). The same script is still working correctly on the Windows XP system.
I am seeing the same issue on a Windows 2003 Server, exp_wait hangs the TCL shell no matter what I do. I've tried -nowait, -nohang... turned off DEP completely and it still happens. This does not happen with the same exact script on XP, Vista or Linux. Did you ever find a solution to this problem?
I have not found a solution to this problem. I'm currently using the exp_wait -nowait as a work-around which has been working for me so far.