in reply to Re^18: Net::OpenSSH loosing lines ins reply
in thread Net::OpenSSH loosing lines ins reply
write(1, "torm-control broadcast level 10."..., 4096) = 4096 write(1, "rol broadcast level 10.00\n1782: "..., 4096) = -1 EAGAIN (Re +source temporarily unavailable)
The only plausible explanation I can think of is OpenSSH ssh setting STDOUT into non-blocking mode. BTW, how are you capturing STDOUT?
Add a dump of /proc/$$/fdinfo:
open OUT, ">", "./trace.out"; for (0, 1, 2) { local $/; open my $fdinfo, '<', "/proc/$$/fdinfo/$_"; my $info = <$fdinfo>; print OUT "fdinfo $_:\n$info\n\n"; } my $line =0; foreach (@cmdout) { $line++; my $bytes = print $line.": ".$_; print OUT "$line: bytes: $bytes, err: $! \n"; } close(OUT);
The non-blocking flag is 0x4000. You may also like to generate dumps of fdinfo before the constructor call and before and after calling capture.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^20: Net::OpenSSH loosing lines ins reply
by Andy16 (Acolyte) on Jun 05, 2014 at 09:28 UTC | |
by salva (Canon) on Jun 05, 2014 at 09:57 UTC | |
by Andy16 (Acolyte) on Jun 05, 2014 at 10:45 UTC |