From: Jamis Buck Date: 2005-02-18T07:29:03+09:00 Subject: Re: net::ssh popen3 issue? On 00:59 Fri 18 Feb , ritchie@ipowerhouse.com wrote: > Jamis thanks for your answer, it worked. > > These timing issues are related only to the blocking methods? If I use > channels and state machine stuff all should be well for my production > code? Yes, on both counts. The timing issues occur because the output from your command may or may not be sent all in one packet to the client. Thus, calling "pipe.read" once may only return part of the output...but the questions is, how many times should you keep trying to call it? If you call it too many times, your program will block, which is not usually a good thing. In general, the channels and state machines will provide a more general-purpose solution, but they are (unfortunately) rather unwieldy to implement and maintain. As I said, I'm still looking for a better option. In the meantime, the shell.sync service seems to do okay. - Jamis -- Jamis Buck jamis_buck@byu.edu http://jamis.jamisbuck.org ------------------------------ "I am Victor of Borge. You will be assimil-nine-ed."