summaryrefslogtreecommitdiff
path: root/src/remount-fs
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-10-10 22:07:30 +0200
committerLennart Poettering <lennart@poettering.net>2016-10-10 22:57:01 +0200
commit1f0958f640b87175cd547c1e69084cfe54a22e9d (patch)
treee1a49f2a31920394f951f3d14f0e7e06125faab5 /src/remount-fs
parent38107f5a4ad5ab148054910040d5d548a4c7a805 (diff)
downloadsystemd-1f0958f640b87175cd547c1e69084cfe54a22e9d.tar.gz
core: when determining whether a process exit status is clean, consider whether it is a command or a daemon
SIGTERM should be considered a clean exit code for daemons (i.e. long-running processes, as a daemon without SIGTERM handler may be shut down without issues via SIGTERM still) while it should not be considered a clean exit code for commands (i.e. short-running processes). Let's add two different clean checking modes for this, and use the right one at the appropriate places. Fixes: #4275
Diffstat (limited to 'src/remount-fs')
-rw-r--r--src/remount-fs/remount-fs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/remount-fs/remount-fs.c b/src/remount-fs/remount-fs.c
index 6468d1eecd..c3bdcaf1da 100644
--- a/src/remount-fs/remount-fs.c
+++ b/src/remount-fs/remount-fs.c
@@ -137,7 +137,7 @@ int main(int argc, char *argv[]) {
s = hashmap_remove(pids, PID_TO_PTR(si.si_pid));
if (s) {
- if (!is_clean_exit(si.si_code, si.si_status, NULL)) {
+ if (!is_clean_exit(si.si_code, si.si_status, EXIT_CLEAN_COMMAND, NULL)) {
if (si.si_code == CLD_EXITED)
log_error(MOUNT_PATH " for %s exited with exit status %i.", s, si.si_status);
else