]> Cypherpunks repositories - gostls13.git/commit
exp/ssh: alter Session to match the exec.Cmd API
authorDave Cheney <dave@cheney.net>
Sun, 20 Nov 2011 16:46:35 +0000 (11:46 -0500)
committerAdam Langley <agl@golang.org>
Sun, 20 Nov 2011 16:46:35 +0000 (11:46 -0500)
commitfb57134d47977b5c607da2271fa3f5d75400138d
treead3e936fa716620677b88fc811a85f169d0dd3ab
parent05d8d112fe4e78273d2ca0fe7d388a76d9e02407
exp/ssh: alter Session to match the exec.Cmd API

This CL inverts the direction of the Stdin/out/err members of the
Session struct so they reflect the API of the exec.Cmd. In doing so
it borrows heavily from the exec package.

Additionally Shell now returns immediately, wait for completion using
Wait. Exec calls Wait internally and so blocks until the remote
command is complete.

Credit to Gustavo Niemeyer for the impetus for this CL.

R=rsc, agl, n13m3y3r, huin, bradfitz
CC=cw, golang-dev
https://golang.org/cl/5322055
src/pkg/exp/ssh/client.go
src/pkg/exp/ssh/session.go