run0: disable IgnoreSIGPIPE= for transient unit

This commit is contained in:
Mike Yuan 2025-04-15 21:19:25 +02:00
parent 3b65f00f40
commit 52e989642d
No known key found for this signature in database
GPG Key ID: 417471C0A40F58B3
1 changed files with 6 additions and 0 deletions
src/run

View File

@ -1111,6 +1111,12 @@ static int parse_argv_sudo_mode(int argc, char *argv[]) {
if (strv_extend(&arg_property, "PAMName=systemd-run0") < 0)
return log_oom();
/* The service manager ignores SIGPIPE for all spawned processes by default. Let's explicitly override
* that here, since we're primarily invoked in interactive environments, and the termination of
* local terminal session should be acknowledged by remote even for --pipe stdio. */
if (strv_extend(&arg_property, "IgnoreSIGPIPE=no") < 0)
return log_oom();
if (!arg_background && arg_stdio == ARG_STDIO_PTY && shall_tint_background()) {
double hue;