Mercurial > hg-stable
changeset 51003:ce9cb12ca8c9
openvms: fix the pager spawning and cleanup
Unsurprisingly, pager handling needs some adjustment.
author | Jean-Francois Pieronne <jf.pieronne@laposte.net> |
---|---|
date | Thu, 03 Aug 2023 02:33:22 +0200 |
parents | def6f1a4604b |
children | d0b8bbf603d7 |
files | mercurial/ui.py |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/ui.py Thu Aug 03 02:32:28 2023 +0200 +++ b/mercurial/ui.py Thu Aug 03 02:33:22 2023 +0200 @@ -1537,8 +1537,9 @@ raise # back up original file descriptors - stdoutfd = os.dup(procutil.stdout.fileno()) - stderrfd = os.dup(procutil.stderr.fileno()) + if pycompat.sysplatform != b'OpenVMS': + stdoutfd = os.dup(procutil.stdout.fileno()) + stderrfd = os.dup(procutil.stderr.fileno()) os.dup2(pager.stdin.fileno(), procutil.stdout.fileno()) if self._isatty(procutil.stderr): @@ -1549,6 +1550,8 @@ if hasattr(signal, "SIGINT"): signal.signal(signal.SIGINT, signal.SIG_IGN) # restore original fds, closing pager.stdin copies in the process + if pycompat.sysplatform == b'OpenVMS': + pager.kill() os.dup2(stdoutfd, procutil.stdout.fileno()) os.dup2(stderrfd, procutil.stderr.fileno()) pager.stdin.close()