##// END OF EJS Templates
run-tests: replace chdir() with Popen cwd option
Patrick Mezard -
r14340:defa319d default
parent child Browse files
Show More
@@ -60,13 +60,10 b' processlock = threading.Lock()'
60 closefds = os.name == 'posix'
60 closefds = os.name == 'posix'
61 def Popen4(cmd, wd, timeout):
61 def Popen4(cmd, wd, timeout):
62 processlock.acquire()
62 processlock.acquire()
63 orig = os.getcwd()
63 p = subprocess.Popen(cmd, shell=True, bufsize=-1, cwd=wd,
64 os.chdir(wd)
65 p = subprocess.Popen(cmd, shell=True, bufsize=-1,
66 close_fds=closefds,
64 close_fds=closefds,
67 stdin=subprocess.PIPE, stdout=subprocess.PIPE,
65 stdin=subprocess.PIPE, stdout=subprocess.PIPE,
68 stderr=subprocess.STDOUT)
66 stderr=subprocess.STDOUT)
69 os.chdir(orig)
70 processlock.release()
67 processlock.release()
71
68
72 p.fromchild = p.stdout
69 p.fromchild = p.stdout
General Comments 0
You need to be logged in to leave comments. Login now