Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: Net::SSH::Perl doesn't like long commands

by BrowserUk (Pope)
on Jun 10, 2013 at 12:23 UTC ( #1038055=note: print w/ replies, xml ) Need Help??


in reply to Re: Net::SSH::Perl doesn't like long commands
in thread Net::SSH::Perl doesn't like long commands

hangs at some point between 8000 and 10000 characters.

What's the betting that it is somewhere around 8192, the size of PerlIO IO buffers since 5.1(2|4|?).

Maybe someone how has reproduced it could try disabling the buffering and see if that changes anything.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.


Comment on Re^2: Net::SSH::Perl doesn't like long commands
Re^3: Net::SSH::Perl doesn't like long commands
by pattyj (Novice) on Jun 10, 2013 at 13:07 UTC
    Setting $|++ doesn't help unfortunately (and the value on my boxes are different, see above... :/ ).
      Setting $|++ doesn't help

      Worth a shot as it doesn't involve a lot of effort.

      (You do know that for $|++ to affect the socket in question, it needs to be selected first?)


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
Re^3: Net::SSH::Perl doesn't like long commands
by vsespb (Hermit) on Jun 10, 2013 at 13:33 UTC

    I see syswrite calls in this code

    http://cpansearch.perl.org/src/SCHWIGON/Net-SSH-Perl-1.35/lib/Net/SSH/Perl/Packet.pm

    Looks like it's not protected from EAGAIN and from case when syswrite didn't write all data.

    sysread calls are protected.

Re^3: Net::SSH::Perl doesn't like long commands
by salva (Monsignor) on Jun 10, 2013 at 13:38 UTC
    It is very unlikely that buffering may be the root of the problem because of the way the SSH protocol is internally structured in several layers. A buffering issue would have manifested itself as a wider set of problems.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1038055]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2014-07-13 07:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (248 votes), past polls