search for: stderr_write

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

2010 Apr 09
1
[PATCH] Add SSH transfer method
...+ 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 (defined($userna...
2010 Sep 21
1
[PREVIEW ONLY] Refactor data transfer code
...;. - 'fi; '. - 'cat $dev'); + push(@command, $hostname); + push(@command, $command); # Close the ends of the pipes we don't need close($stdin_write); @@ -176,36 +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;...