##// END OF EJS Templates
sshpeer: store subprocess so it cleans up correctly...
Durham Goode -
r18759:9baf4330 default
parent child Browse files
Show More
@@ -70,7 +70,10 b' class sshpeer(wireproto.wirepeer):'
70 70 (_serverquote(remotecmd), _serverquote(self.path))))
71 71 ui.note(_('running %s\n') % cmd)
72 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 78 # skip any noise generated by remote shell
76 79 self._callstream("hello")
@@ -129,13 +129,17 b' def popen2(cmd, env=None, newlines=False'
129 129 return p.stdin, p.stdout
130 130
131 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 136 p = subprocess.Popen(cmd, shell=True, bufsize=-1,
133 137 close_fds=closefds,
134 138 stdin=subprocess.PIPE, stdout=subprocess.PIPE,
135 139 stderr=subprocess.PIPE,
136 140 universal_newlines=newlines,
137 141 env=env)
138 return p.stdin, p.stdout, p.stderr
142 return p.stdin, p.stdout, p.stderr, p
139 143
140 144 def version():
141 145 """Return version information if available."""
General Comments 0
You need to be logged in to leave comments. Login now