Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

main: fix problem when redirecting to newliner on MacOS X.

It's probably just a bug in python 2.4.2, which is the version on my old
MacOS machine.  But it seems that if you use subprocess.Popen with stdout=1
and/or stderr=2, it ends up closing the file descriptors instead of passing
them along.  Since those are the defaults anyway, just use None instead.
  • Loading branch information...
commit 119f9dd3b3421c31578105954a34fc5e32826ae5 1 parent d4b8630
@apenwarr apenwarr authored
Showing with 4 additions and 4 deletions.
  1. +4 −4
@@ -99,12 +99,12 @@ def force_tty():
n = subprocess.Popen([subpath('newliner')],
stdin=subprocess.PIPE, stdout=os.dup(realf),
close_fds=True, preexec_fn=force_tty)
- outf = fix_stdout and n.stdin.fileno() or 1
- errf = fix_stderr and n.stdin.fileno() or 2
+ outf = fix_stdout and n.stdin.fileno() or None
+ errf = fix_stderr and n.stdin.fileno() or None
n = None
- outf = 1
- errf = 2
+ outf = None
+ errf = None
class SigException(Exception):
Please sign in to comment.
Something went wrong with that request. Please try again.