Show More
@@ -70,8 +70,8 b' def _runpager(ui, p):' | |||||
70 | close_fds=util.closefds, stdin=subprocess.PIPE, |
|
70 | close_fds=util.closefds, stdin=subprocess.PIPE, | |
71 | stdout=sys.stdout, stderr=sys.stderr) |
|
71 | stdout=sys.stdout, stderr=sys.stderr) | |
72 |
|
72 | |||
73 | stdout = os.dup(sys.stdout.fileno()) |
|
73 | stdoutfd = os.dup(sys.stdout.fileno()) | |
74 | stderr = os.dup(sys.stderr.fileno()) |
|
74 | stderrfd = os.dup(sys.stderr.fileno()) | |
75 | os.dup2(pager.stdin.fileno(), sys.stdout.fileno()) |
|
75 | os.dup2(pager.stdin.fileno(), sys.stdout.fileno()) | |
76 | if ui._isatty(sys.stderr): |
|
76 | if ui._isatty(sys.stderr): | |
77 | os.dup2(pager.stdin.fileno(), sys.stderr.fileno()) |
|
77 | os.dup2(pager.stdin.fileno(), sys.stderr.fileno()) | |
@@ -81,8 +81,8 b' def _runpager(ui, p):' | |||||
81 | if util.safehasattr(signal, "SIGINT"): |
|
81 | if util.safehasattr(signal, "SIGINT"): | |
82 | signal.signal(signal.SIGINT, signal.SIG_IGN) |
|
82 | signal.signal(signal.SIGINT, signal.SIG_IGN) | |
83 | pager.stdin.close() |
|
83 | pager.stdin.close() | |
84 | os.dup2(stdout, sys.stdout.fileno()) |
|
84 | os.dup2(stdoutfd, sys.stdout.fileno()) | |
85 | os.dup2(stderr, sys.stderr.fileno()) |
|
85 | os.dup2(stderrfd, sys.stderr.fileno()) | |
86 | pager.wait() |
|
86 | pager.wait() | |
87 |
|
87 | |||
88 | def uisetup(ui): |
|
88 | def uisetup(ui): |
General Comments 0
You need to be logged in to leave comments.
Login now