summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-02-21 10:49:49 +0100
committerGitHub <noreply@github.com>2017-02-21 10:49:49 +0100
commit1ebfd03bd9d3fb8ccb5d17fd741b04914479df28 (patch)
tree4246d7b450bcc1a947fd8c206f2bc61d2f7ed79b /src/core
parentcc7de2ba32562311288480e3a8faba0298852299 (diff)
parent2fa4861ad5a203bff604cac660136834e3b70108 (diff)
Merge pull request #5390 from keszybz/coverity
Clarifications to make coverity happy
Diffstat (limited to 'src/core')
-rw-r--r--src/core/execute.c10
-rw-r--r--src/core/killall.c3
2 files changed, 8 insertions, 5 deletions
diff --git a/src/core/execute.c b/src/core/execute.c
index f455afa962..d7798387c5 100644
--- a/src/core/execute.c
+++ b/src/core/execute.c
@@ -1144,11 +1144,13 @@ static int setup_pam(
/* Tell the parent that our setup is done. This is especially
* important regarding dropping privileges. Otherwise, unit
- * setup might race against our setresuid(2) call. */
- barrier_place(&barrier);
+ * setup might race against our setresuid(2) call.
+ *
+ * If the parent aborted, we'll detect this below, hence ignore
+ * return failure here. */
+ (void) barrier_place(&barrier);
- /* Check if our parent process might already have
- * died? */
+ /* Check if our parent process might already have died? */
if (getppid() == parent_pid) {
sigset_t ss;
diff --git a/src/core/killall.c b/src/core/killall.c
index 7a9df546ee..3fe9fa2ed0 100644
--- a/src/core/killall.c
+++ b/src/core/killall.c
@@ -213,7 +213,8 @@ static int killall(int sig, Set *pids, bool send_sighup) {
if (get_ctty_devnr(pid, NULL) >= 0)
- kill(pid, SIGHUP);
+ /* it's OK if the process is gone, just ignore the result */
+ (void) kill(pid, SIGHUP);
}
}