##// END OF EJS Templates
logtoprocess: connect all fds to /dev/null to avoid bad interaction with pager...
Boris Feld -
r39962:c4a3d3c6 default
parent child Browse files
Show More
@@ -83,11 +83,16 b' def uisetup(ui):'
83 else:
83 else:
84 newsession = {'start_new_session': True}
84 newsession = {'start_new_session': True}
85 try:
85 try:
86 # connect stdin to devnull to make sure the subprocess can't
86 # connect std* to devnull to make sure the subprocess can't
87 # muck up that stream for mercurial.
87 # muck up these stream for mercurial.
88 # Connect all the streams to be more close to Windows behavior
89 # and pager will wait for scripts to end if we don't do that
90 nullrfd = open(os.devnull, 'r')
91 nullwfd = open(os.devnull, 'w')
88 subprocess.Popen(
92 subprocess.Popen(
89 procutil.tonativestr(script),
93 procutil.tonativestr(script),
90 shell=True, stdin=open(os.devnull, 'r'),
94 shell=True, stdin=nullrfd,
95 stdout=nullwfd, stderr=nullwfd,
91 env=procutil.tonativeenv(env),
96 env=procutil.tonativeenv(env),
92 close_fds=True, **newsession)
97 close_fds=True, **newsession)
93 finally:
98 finally:
@@ -121,4 +121,4 b' resulting file will not exists. If not, '
121 $ touch $TESTTMP/wait-for-touched
121 $ touch $TESTTMP/wait-for-touched
122 $ sleep 0.2
122 $ sleep 0.2
123 $ test -f $TESTTMP/touched && echo "SUCCESS Pager is not waiting on ltp" || echo "FAIL Pager is waiting on ltp"
123 $ test -f $TESTTMP/touched && echo "SUCCESS Pager is not waiting on ltp" || echo "FAIL Pager is waiting on ltp"
124 FAIL Pager is waiting on ltp
124 SUCCESS Pager is not waiting on ltp
General Comments 0
You need to be logged in to leave comments. Login now