Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Threads Printing Issue - Output Mangled / Term Crashing

by salva (Abbot)
on Apr 14, 2014 at 11:41 UTC ( #1082232=note: print w/ replies, xml ) Need Help??


in reply to Threads Printing Issue - Output Mangled / Term Crashing

Probably the error is related to having several ssh processes accessing /dev/tty in parallel.

In any case, you can try using Net::OpenSSH::Parallel.


Comment on Re: Threads Printing Issue - Output Mangled / Term Crashing
Select or Download Code
Re^2: Threads Printing Issue - Output Mangled / Term Crashing
by bigbot (Beadle) on Apr 14, 2014 at 11:46 UTC
    Well I have a lot of other scripts that create many simultaneous SSH connections at once (with no issues like this, even printing out data, etc). However, this is the first time I've had to use the SSH -tt option to force Force pseudo-tty allocation on the remote systems. This is because tcpdump doesn't die after the SSH connection is closed without it (at least until it sees a packet that matches the filter).
      Then, and easy workaround is to write a wrapper for tcpdump that launches it and then kills it when stdin is closed:
      #!/usr/bin/perl # untested: require POSIX; my $pid = fork; unless ($pid) { exec 'tcpdump', @ARGV; POSIX::_exit(1); } while (<>) { ; }; # just discard input until EOF kill KILL => $pid;
      You will have to place the wrapper on the remote machines (or just make it into a perl one-liner and pass it on the ssh call)
        But do you think the SSH -t options are what's causing the issue?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (10)
As of 2014-12-19 22:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (94 votes), past polls