I'm writing some code using pthreads and expect interpreter library (sequence of Tcl_CreateInterp, Exp_Init, exp_parse_argv, exp_interpret_cmdfilename). Unfortunately, when I create more than one expect interpreter thread, some strange problems appear: segfaults in Tcl_WaitForEvent, Tcl_Init failed: out of stack space (infinite loop?) errors, and other strange program malfunctions suggesting that expect library functions may not be thread-safe… can someone confirm on this ?
ok, just in case someone has a similiar question - i've looked into the libexpect sources, and i've found out that it's not anywhere near being thread-safe, so it's not possible to use its functions in a multithreaded code (at least not "out of the box")…
fortunately I did'nt try that, although I supposed to do once.
Now I will never:)
Log in to post a comment.