mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 16:31:02 +03:00
py3: fix tweakdefaults on Windows again
Summary: The previous change here wasn't sufficient. We need to wrap the handle fd in a Handle now as well. Reviewed By: quark-zju, sfilipco Differential Revision: D27753458 fbshipit-source-id: bd8ebbdcdc9acb411362795263b1419360f15e1a
This commit is contained in:
parent
b6160bbb4a
commit
d678e3ac7c
@ -745,12 +745,14 @@ def get_winpopen4(pipei_bufsize):
|
||||
import _subprocess
|
||||
|
||||
handles = _subprocess.CreatePipe(None, pipei_bufsize)
|
||||
rfd, wfd = [msvcrt.open_osfhandle(h, 0) for h in handles]
|
||||
else:
|
||||
import _winapi
|
||||
|
||||
handles = _winapi.CreatePipe(None, pipei_bufsize)
|
||||
rfd, wfd = [msvcrt.open_osfhandle(h, 0) for h in handles]
|
||||
handles = [subprocess.Handle(h) for h in handles]
|
||||
|
||||
rfd, wfd = [msvcrt.open_osfhandle(h, 0) for h in handles]
|
||||
handles[0].Detach()
|
||||
handles[1].Detach()
|
||||
p = subprocess.Popen(
|
||||
|
Loading…
Reference in New Issue
Block a user