##// END OF EJS Templates
openvms: fix the pager spawning and cleanup...
Jean-Francois Pieronne -
r51891:ce9cb12c default
parent child Browse files
Show More
@@ -1537,8 +1537,9 b' class ui:'
1537 raise
1537 raise
1538
1538
1539 # back up original file descriptors
1539 # back up original file descriptors
1540 stdoutfd = os.dup(procutil.stdout.fileno())
1540 if pycompat.sysplatform != b'OpenVMS':
1541 stderrfd = os.dup(procutil.stderr.fileno())
1541 stdoutfd = os.dup(procutil.stdout.fileno())
1542 stderrfd = os.dup(procutil.stderr.fileno())
1542
1543
1543 os.dup2(pager.stdin.fileno(), procutil.stdout.fileno())
1544 os.dup2(pager.stdin.fileno(), procutil.stdout.fileno())
1544 if self._isatty(procutil.stderr):
1545 if self._isatty(procutil.stderr):
@@ -1549,6 +1550,8 b' class ui:'
1549 if hasattr(signal, "SIGINT"):
1550 if hasattr(signal, "SIGINT"):
1550 signal.signal(signal.SIGINT, signal.SIG_IGN)
1551 signal.signal(signal.SIGINT, signal.SIG_IGN)
1551 # restore original fds, closing pager.stdin copies in the process
1552 # restore original fds, closing pager.stdin copies in the process
1553 if pycompat.sysplatform == b'OpenVMS':
1554 pager.kill()
1552 os.dup2(stdoutfd, procutil.stdout.fileno())
1555 os.dup2(stdoutfd, procutil.stdout.fileno())
1553 os.dup2(stderrfd, procutil.stderr.fileno())
1556 os.dup2(stderrfd, procutil.stderr.fileno())
1554 pager.stdin.close()
1557 pager.stdin.close()
General Comments 0
You need to be logged in to leave comments. Login now