##// END OF EJS Templates
procutil: compare fd number to see if stdio protection is needed (issue5992)...
Yuya Nishihara -
r39873:e5724be6 stable
parent child Browse files
Show More
@@ -273,13 +273,13 b' def protectstdio(uin, uout):'
273 """
273 """
274 uout.flush()
274 uout.flush()
275 fin, fout = uin, uout
275 fin, fout = uin, uout
276 if uin is stdin:
276 if _testfileno(uin, stdin):
277 newfd = os.dup(uin.fileno())
277 newfd = os.dup(uin.fileno())
278 nullfd = os.open(os.devnull, os.O_RDONLY)
278 nullfd = os.open(os.devnull, os.O_RDONLY)
279 os.dup2(nullfd, uin.fileno())
279 os.dup2(nullfd, uin.fileno())
280 os.close(nullfd)
280 os.close(nullfd)
281 fin = os.fdopen(newfd, r'rb')
281 fin = os.fdopen(newfd, r'rb')
282 if uout is stdout:
282 if _testfileno(uout, stdout):
283 newfd = os.dup(uout.fileno())
283 newfd = os.dup(uout.fileno())
284 os.dup2(stderr.fileno(), uout.fileno())
284 os.dup2(stderr.fileno(), uout.fileno())
285 fout = os.fdopen(newfd, r'wb')
285 fout = os.fdopen(newfd, r'wb')
@@ -328,6 +328,10 b' try again with remote chg, which should '
328 pushing to ssh://user@dummy/remote
328 pushing to ssh://user@dummy/remote
329 searching for changes
329 searching for changes
330 remote has heads on branch 'default' that are not known locally: 6c0482d977a3
330 remote has heads on branch 'default' that are not known locally: 6c0482d977a3
331 remote: adding changesets
332 remote: adding manifests
333 remote: adding file changes
334 remote: added 1 changesets with 1 changes to 1 files
331 abort: not a Mercurial bundle
335 abort: not a Mercurial bundle
332 [255]
336 [255]
333
337
General Comments 0
You need to be logged in to leave comments. Login now