Show More
@@ -59,14 +59,17 b' from mercurial.i18n import _' | |||
|
59 | 59 | |
|
60 | 60 | def _runpager(p): |
|
61 | 61 | if not hasattr(os, 'fork'): |
|
62 |
|
|
|
62 | sys.stdout = util.popen(p, 'wb') | |
|
63 | if sys.stderr.isatty(): | |
|
64 | sys.stderr = sys.stdout | |
|
63 | 65 | return |
|
64 | 66 | fdin, fdout = os.pipe() |
|
65 | 67 | pid = os.fork() |
|
66 | 68 | if pid == 0: |
|
67 | 69 | os.close(fdin) |
|
68 | 70 | os.dup2(fdout, sys.stdout.fileno()) |
|
69 |
|
|
|
71 | if sys.stderr.isatty(): | |
|
72 | os.dup2(fdout, sys.stderr.fileno()) | |
|
70 | 73 | os.close(fdout) |
|
71 | 74 | return |
|
72 | 75 | os.dup2(fdin, sys.stdin.fileno()) |
General Comments 0
You need to be logged in to leave comments.
Login now