From: Roland G. <RGI...@cp...> - 2002-12-14 19:40:02
|
Sorry for replying so late... >> When trying to debug my cruft (elided), >> I had a consistent problem hooking up to spawned process under the >> debugger. Well, debugging programs that fork is not easy, and even binary debuggers have their problems with such a case. It gets even worse for the perl debugger: when the perl interpreter forks, it also means that the debugger forks, in fact you are then dealing with two independent debuggers that don't know of each other, but continue to share their various filedescriptors, namely STDIN. So the parent process now sees not the child it expects to, but the child-behind-a-debugger, which may and often does result in confusion. I don't think there is really a solution for that problem, apart from "if that hurts, don't do that". Oh, and that's why I'm trying to discourage the use of Expect (well, actually IO::Tty) and point to other solutions, e.g. Net::Telnet instead of spawning a telnet client. Expect still can be used with Net::Telnet, but without the overhead of spawning another process. There is even a pure-perl implementation of ssh, but unfortunately without a filedescriptor-interface that is usable with Expect... This leaves the good olde, but not very powerful debug-with-print... Sorry that I cannot be of more help. Roland |