summaryrefslogtreecommitdiff
path: root/check-style.py
diff options
context:
space:
mode:
authorRobert Mader <robert.mader@posteo.de>2021-08-23 17:36:30 +0200
committerCarlos Garnacho <carlosg@gnome.org>2022-12-07 12:29:10 +0100
commita066b1e607e182167f6e6e083df1e963df421ef9 (patch)
treee291331fd511959f8a74264d087da6200e0d42ca /check-style.py
parent1791c83d111c6bcbb2d333bfdbc887562ddca197 (diff)
downloadtracker-a066b1e607e182167f6e6e083df1e963df421ef9.tar.gz
ci: Avoid deadlock while reading uncrustify output
The docu for `Popen.wait()` says: > This will deadlock when using stdout=PIPE and/or stderr=PIPE and > the child process generates enough output to a pipe such that it > blocks waiting for the OS pipe buffer to accept more data.
Diffstat (limited to 'check-style.py')
-rwxr-xr-xcheck-style.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/check-style.py b/check-style.py
index f3f718c90..7275af042 100755
--- a/check-style.py
+++ b/check-style.py
@@ -76,11 +76,11 @@ def reformat_chunks(chunks, rewrite):
# uncrustify chunk
proc = subprocess.Popen(["uncrustify", "-c", uncrustify_cfg, "-f", tmp.name], stdout=subprocess.PIPE)
+ reindented = proc.stdout.readlines()
proc.wait()
if proc.returncode != 0:
continue
- reindented = proc.stdout.readlines()
tmp.close()
# Remove INDENT-ON/OFF comments