]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
run0: disable IgnoreSIGPIPE= for transient unit
authorMike Yuan <me@yhndnzj.com>
Tue, 15 Apr 2025 19:19:25 +0000 (21:19 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 6 May 2025 16:39:04 +0000 (01:39 +0900)
src/run/run.c

index d03604e4ee7580c92e40b1d0d4498f467f3bfddd..7b6fe01d5620083d180bf3cc94f732f0ce4bfaa9 100644 (file)
@@ -1095,6 +1095,11 @@ 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 where this does matter. */
+        if (strv_extend(&arg_property, "IgnoreSIGPIPE=no") < 0)
+                return log_oom();
+
         if (!arg_background && arg_stdio == ARG_STDIO_PTY && shall_tint_background()) {
                 double hue;