Show More
@@ -70,7 +70,10 b' class sshpeer(wireproto.wirepeer):' | |||||
70 | (_serverquote(remotecmd), _serverquote(self.path)))) |
|
70 | (_serverquote(remotecmd), _serverquote(self.path)))) | |
71 | ui.note(_('running %s\n') % cmd) |
|
71 | ui.note(_('running %s\n') % cmd) | |
72 | cmd = util.quotecommand(cmd) |
|
72 | cmd = util.quotecommand(cmd) | |
73 | self.pipeo, self.pipei, self.pipee = util.popen3(cmd) |
|
73 | ||
|
74 | # while self.subprocess isn't used, having it allows the subprocess to | |||
|
75 | # to clean up correctly later | |||
|
76 | self.pipeo, self.pipei, self.pipee, self.subprocess = util.popen4(cmd) | |||
74 |
|
77 | |||
75 | # skip any noise generated by remote shell |
|
78 | # skip any noise generated by remote shell | |
76 | self._callstream("hello") |
|
79 | self._callstream("hello") |
@@ -129,13 +129,17 b' def popen2(cmd, env=None, newlines=False' | |||||
129 | return p.stdin, p.stdout |
|
129 | return p.stdin, p.stdout | |
130 |
|
130 | |||
131 | def popen3(cmd, env=None, newlines=False): |
|
131 | def popen3(cmd, env=None, newlines=False): | |
|
132 | stdin, stdout, stderr, p = popen4(cmd, env, newlines) | |||
|
133 | return stdin, stdout, stderr | |||
|
134 | ||||
|
135 | def popen4(cmd, env=None, newlines=False): | |||
132 | p = subprocess.Popen(cmd, shell=True, bufsize=-1, |
|
136 | p = subprocess.Popen(cmd, shell=True, bufsize=-1, | |
133 | close_fds=closefds, |
|
137 | close_fds=closefds, | |
134 | stdin=subprocess.PIPE, stdout=subprocess.PIPE, |
|
138 | stdin=subprocess.PIPE, stdout=subprocess.PIPE, | |
135 | stderr=subprocess.PIPE, |
|
139 | stderr=subprocess.PIPE, | |
136 | universal_newlines=newlines, |
|
140 | universal_newlines=newlines, | |
137 | env=env) |
|
141 | env=env) | |
138 | return p.stdin, p.stdout, p.stderr |
|
142 | return p.stdin, p.stdout, p.stderr, p | |
139 |
|
143 | |||
140 | def version(): |
|
144 | def version(): | |
141 | """Return version information if available.""" |
|
145 | """Return version information if available.""" |
General Comments 0
You need to be logged in to leave comments.
Login now