search for: stderr_read

Displaying 2 results from an estimated 2 matches for "stderr_read".

2010 Apr 09
1
[PATCH] Add SSH transfer method
...h => $path, + host => $uri->host, + output => $msg))); + } + + return $vol; +} + +sub _connect +{ + my ($host, $username, $path) = @_; + + my ($stdin_read, $stdin_write); + my ($stdout_read, $stdout_write); + my ($stderr_read, $stderr_write); + + pipe($stdin_read, $stdin_write); + pipe($stdout_read, $stdout_write); + pipe($stderr_read, $stderr_write); + + my $pid = fork(); + if ($pid == 0) { + my @command; + push(@command, 'ssh'); + push(@command, '-l', $username) if (...
2010 Sep 21
1
[PREVIEW ONLY] Refactor data transfer code
...+69,271 @@ sub _connect close($stdout_write); close($stderr_write); - # Check that we don't get output on stderr before we read the file size + $self->{pid} = $pid; + $self->{stdin} = $stdin_write; + $self->{stdout} = $stdout_read; + $self->{stderr} = $stderr_read; + + $self->{hostname} = $hostname; + + return $self; +} + +sub close +{ + my $self = shift; + + # Nothing to do if it's already closed. + return unless (exists($self->{pid})); + + my $pid = $self->{pid}; + my $stderr = $self->{stderr}; + + # Must close st...