mirror of
https://github.com/brl/mutter.git
synced 2024-11-27 10:30:47 -05:00
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.
Fixes 3caa5fea3c
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1971>
This commit is contained in:
parent
3caa5fea3c
commit
6960b9b45a
@ -76,11 +76,11 @@ def reformat_chunks(chunks, rewrite):
|
|||||||
|
|
||||||
# uncrustify chunk
|
# uncrustify chunk
|
||||||
proc = subprocess.Popen(["uncrustify", "-c", uncrustify_cfg, "-f", tmp.name], stdout=subprocess.PIPE)
|
proc = subprocess.Popen(["uncrustify", "-c", uncrustify_cfg, "-f", tmp.name], stdout=subprocess.PIPE)
|
||||||
|
reindented = proc.stdout.readlines()
|
||||||
proc.wait()
|
proc.wait()
|
||||||
if proc.returncode != 0:
|
if proc.returncode != 0:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
reindented = proc.stdout.readlines()
|
|
||||||
tmp.close()
|
tmp.close()
|
||||||
|
|
||||||
# Remove INDENT-ON/OFF comments
|
# Remove INDENT-ON/OFF comments
|
||||||
|
Loading…
Reference in New Issue
Block a user