1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00
Friedrich Weber 1303d9211d scheduler: avoid waiting for stdout eof of /etc/network/ scripts
Scripts in /etc/network/ are executed using `exec_command` which
captures stdout by default, and thus waits for stdout end-of-file via
`Popen.communicate()`. However, this can cause hangs if the network
script executes a long-running command in the background. Can be
reproduced by putting the following (executable) script in
/etc/network/if-up.d/:

	#!/bin/sh
	sleep 5&

This script will cause `ifreload -a` to wait for 5 seconds per network
interface.

To avoid waiting, do not capture stdout when executing /etc/network/
scripts. This also improves compatibility with ifupdown, which runs
the above script in the background.

Signed-off-by: Friedrich Weber <f.weber@proxmox.com>
2023-09-28 14:01:34 +02:00
..