Commit da785869 authored by Anael Beutot's avatar Anael Beutot Committed by Sébastien Luttringer
Browse files

Fix close fds for pager child process

parent 6a743642
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -203,10 +203,12 @@ class Printer(object):
        '''Page data using PAGER'''
        binary = os.environ.get("CC_PAGER", os.environ.get("PAGER", "more"))
        if isinstance(data, basestring):
            p = subprocess.Popen(binary, stdin=subprocess.PIPE, shell=True)
            p = subprocess.Popen(binary, stdin=subprocess.PIPE, close_fds=True,
                                 shell=True)
            p.communicate(data)
        else:
            p = subprocess.Popen(binary, stdin=data, shell=True)
            p = subprocess.Popen(binary, stdin=data, close_fds=True,
                                 shell=True)
            p.wait()