summaryrefslogtreecommitdiff
path: root/src/login
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-12-28 00:51:19 +0100
committerSven Eden <yamakuzure@gmx.net>2018-05-30 07:49:51 +0200
commited4c3116dde259feafce15e05a9360f5debb0386 (patch)
treece8c8925cdbb4d25cb81e568ccc3caa884242e95 /src/login
parent093bfffb485caf4d1d328e9585641005029a83d9 (diff)
process-util: rework wait_for_terminate_and_warn() to take a flags parameter
This renames wait_for_terminate_and_warn() to wait_for_terminate_and_check(), and adds a flags parameter, that controls how much to log: there's one flag that means we log about abnormal stuff, and another one that controls whether we log about non-zero exit codes. Finally, there's a shortcut flag value for logging in both cases, as that's what we usually use. All callers are accordingly updated. At three occasions duplicate logging is removed, i.e. where the old function was called but logged in the caller, too.
Diffstat (limited to 'src/login')
-rw-r--r--src/login/inhibit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/login/inhibit.c b/src/login/inhibit.c
index 76571217f..7e6812c2d 100644
--- a/src/login/inhibit.c
+++ b/src/login/inhibit.c
@@ -280,7 +280,7 @@ int main(int argc, char *argv[]) {
_exit(EXIT_FAILURE);
}
- r = wait_for_terminate_and_warn(argv[optind], pid, true);
+ r = wait_for_terminate_and_check(argv[optind], pid, WAIT_LOG);
return r < 0 ? EXIT_FAILURE : r;
}