diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-10-20 09:35:40 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-20 09:35:40 -0400 |
commit | 8fdea26c94b22149040b8f29c8df7a92a50e0588 (patch) | |
tree | 9ca032131872ae87a374fc5ce9052f23687a2736 /src/core/show-status.c | |
parent | 332c0d48a9ba18e1601f072d4cb513751f8990f9 (diff) | |
parent | 47da760efddc1fae8dac460430efd0ae7090c6c4 (diff) |
Merge pull request #4414 from poettering/consolesakcomment
three minor fixes: document /dev/console/SAK handling + another cgroups wording fix + document User= default
Diffstat (limited to 'src/core/show-status.c')
-rw-r--r-- | src/core/show-status.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/show-status.c b/src/core/show-status.c index 59ebdc7219..65f9cb888a 100644 --- a/src/core/show-status.c +++ b/src/core/show-status.c @@ -61,6 +61,11 @@ int status_vprintf(const char *status, bool ellipse, bool ephemeral, const char if (vasprintf(&s, format, ap) < 0) return log_oom(); + /* Before you ask: yes, on purpose we open/close the console for each status line we write individually. This + * is a good strategy to avoid PID 1 getting killed by the kernel's SAK concept (it doesn't fix this entirely, + * but minimizes the time window the kernel might end up killing PID 1 due to SAK). It also makes things easier + * for us so that we don't have to recover from hangups and suchlike triggered on the console. */ + fd = open_terminal("/dev/console", O_WRONLY|O_NOCTTY|O_CLOEXEC); if (fd < 0) return fd; |