From 514f1de64a582d3a183b853990484a2ac72f86a8 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Fri, 4 Oct 2019 16:22:15 +0100 Subject: [PATCH] mdwsetup.py (progoutput): Only read one byte to decide whether there is more. There's no point in slurping the entire output now that we're closing the pipe /before/ trying to waitpid(2): the child will hit `SIGPIPE' (or `EPIPE') rather than blocking on output. --- mdwsetup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mdwsetup.py b/mdwsetup.py index 57832a2..0210714 100644 --- a/mdwsetup.py +++ b/mdwsetup.py @@ -76,7 +76,7 @@ def progoutput(command): kid = SUB.Popen(command, stdout = SUB.PIPE) try: out = kid.stdout.readline() - junk = kid.stdout.read() + junk = kid.stdout.read(1) finally: kid.stdout.close() if junk != '': raise ValueError \ -- 2.11.0