From 1ccb0019b16b064dfde1e320b7921c82e8409f5b Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 25 Feb 2012 15:05:04 -0500 Subject: [PATCH] Keep stdin (file descriptor 0) open in the pager's child process. This fixes the underlying problem that we worked around in commit 2c9ae15f53aef57d28091b237c193c653c6e80dd. Now even $ echo 'some bug | be --paginate new - will work instead of raising IOError: [Errno 9] Bad file descriptor. --- libbe/ui/util/pager.py | 1 - 1 file changed, 1 deletion(-) diff --git a/libbe/ui/util/pager.py b/libbe/ui/util/pager.py index 08b1024..e6e6d1b 100644 --- a/libbe/ui/util/pager.py +++ b/libbe/ui/util/pager.py @@ -50,7 +50,6 @@ def run_pager(paginate='auto'): if os.fork() == 0: # child process os.close(read_fd) - os.close(0) os.dup2(write_fd, 1) os.close(write_fd) if hasattr(sys.stderr, 'isatty') and sys.stderr.isatty() == True: -- 2.26.2