From 80addc3f11e41101ed3a30aa17d4d8741d5592b9 Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Sat, 27 Jan 2018 15:19:24 -0600 Subject: [PATCH] main: don't set stdio to nonblocking This was left in the newliner replacement patch, and I can't remember a justification for it. Having it in there affects other processes, so take it out. Signed-off-by: Rob Browning Tested-by: Rob Browning --- main.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/main.py b/main.py index edb3ed8..154c5dc 100755 --- a/main.py +++ b/main.py @@ -8,10 +8,9 @@ exec "$bup_python" "$0" ${1+"$@"} from __future__ import absolute_import import errno, re, sys, os, subprocess, signal, getopt -from fcntl import F_GETFL, F_SETFL from subprocess import PIPE from sys import stderr, stdout -import fcntl, select +import select argv = sys.argv exe = os.path.realpath(argv[0]) @@ -187,9 +186,6 @@ def filter_output(src_out, src_err, dest_out, dest_err): pending_ex = None try: fds = tuple([x for x in (src_out, src_err) if x is not None]) - for fd in fds: - flags = fcntl.fcntl(fd, F_GETFL) - assert fcntl.fcntl(fd, F_SETFL, flags | os.O_NONBLOCK) == 0 while fds: ready_fds, _, _ = select.select(fds, [], []) width = tty_width() -- 2.39.2