Hi,
> > This works OK in linux, but under Cygwin, the the connection
> > filehandle/socket and the filehandles that are used to execute the
> > external program are somehow linked... the connection is only
> > terminated after the program ends. In the test case below, the
> > program to be executed is just "/bin/ls; sleep 10; /bin/ls".
> > Under cygwin, the socket stays alive until all the execution is
> > finished. Under linux, everything works OK, with the connection
> > being close, and the execution happenning independently.
> [...]
> gotConnectionInput() looks ok. It catches "doit" and initiates the
> action. You indicated that the action occurs, so the code here is
> running. Do your clients receive the "Got it, executing... bye"
> message before or after the program finishes?
On linux and on cygwin, the client receive's it before the program
finishes. But on linux, it sends the message and the connection is closed.
On cygwin, it sends the message and only closes when the program finishes.
> I think the local filehandles here will cause problems if runJob() is
> re-entered. I usually use Symbol's gensym() method to create lexical
> filehandles instead. This probably has nothing to do with the problem
> at hand.
>
> Is it possible that open3() isn't returning until $path has finished?
Nope, it returns normally while $path is still being executed..
Cristiano Lincoln Mattos
Tempest Security Technologies - www.tempest.com.br
CESAR - Centro de Estudos e Sistemas Avancados do Recife - www.cesar.org.br