Silence "Exception ignored when trying to write to the signal wakeup fd"
Disable warn_on_full_buffer via set_wakeup_fd. This avoids tons of Exception ignored when trying to write to the signal wakeup fd: BlockingIOError: [Errno 11] Resource temporarily unavailable that are currently issued after running complex builds. Only works since Python 3.7, though, so this remains best-effort. Fortunately, the Debian in our container image is 3.7. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
parent
368cdffc24
commit
87af46ff8c
@ -31,6 +31,7 @@ import tempfile
|
|||||||
import asyncio
|
import asyncio
|
||||||
import errno
|
import errno
|
||||||
import pathlib
|
import pathlib
|
||||||
|
import signal
|
||||||
from subprocess import Popen, PIPE
|
from subprocess import Popen, PIPE
|
||||||
from .context import get_context
|
from .context import get_context
|
||||||
|
|
||||||
@ -93,6 +94,13 @@ async def run_cmd_async(cmd, cwd, env=None, fail=True, liveupdate=True):
|
|||||||
|
|
||||||
logo = LogOutput(liveupdate)
|
logo = LogOutput(liveupdate)
|
||||||
|
|
||||||
|
try:
|
||||||
|
orig_fd = signal.set_wakeup_fd(-1, warn_on_full_buffer=False)
|
||||||
|
signal.set_wakeup_fd(orig_fd, warn_on_full_buffer=False)
|
||||||
|
except TypeError:
|
||||||
|
# Python < 3.7 - we tried our best
|
||||||
|
pass
|
||||||
|
|
||||||
try:
|
try:
|
||||||
process = await asyncio.create_subprocess_exec(
|
process = await asyncio.create_subprocess_exec(
|
||||||
*cmd,
|
*cmd,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user