projects
/
be.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2c9ae15
)
Keep stdin (file descriptor 0) open in the pager's child process.
author
W. Trevor King
<wking@drexel.edu>
Sat, 25 Feb 2012 20:05:04 +0000
(15:05 -0500)
committer
W. Trevor King
<wking@drexel.edu>
Sat, 25 Feb 2012 20:05:08 +0000
(15:05 -0500)
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
patch
|
blob
|
history
diff --git
a/libbe/ui/util/pager.py
b/libbe/ui/util/pager.py
index 08b10249567389edf26a6ec04d2ba820f5f7204e..e6e6d1bd8fb4f54d5f5a102f6d5d2a5916b71b32 100644
(file)
--- 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: