chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
unit: when deserializing do reconnect to dbus/syslog when they show up
[elogind.git]
/
src
/
swap.c
diff --git
a/src/swap.c
b/src/swap.c
index f59b0fb18d6561d157f1a1d55bfed9f7a4786e4b..66bf5c2bfbffae371099b118def1d499c975b32d 100644
(file)
--- a/
src/swap.c
+++ b/
src/swap.c
@@
-37,6
+37,7
@@
#include "special.h"
#include "bus-errors.h"
#include "exit-status.h"
#include "special.h"
#include "bus-errors.h"
#include "exit-status.h"
+#include "def.h"
static const UnitActiveState state_translation_table[_SWAP_STATE_MAX] = {
[SWAP_DEAD] = UNIT_INACTIVE,
static const UnitActiveState state_translation_table[_SWAP_STATE_MAX] = {
[SWAP_DEAD] = UNIT_INACTIVE,
@@
-660,9
+661,7
@@
static void swap_enter_signal(Swap *s, SwapState state, bool success) {
state == SWAP_DEACTIVATING_SIGTERM) ? s->exec_context.kill_signal : SIGKILL;
if (s->control_pid > 0) {
state == SWAP_DEACTIVATING_SIGTERM) ? s->exec_context.kill_signal : SIGKILL;
if (s->control_pid > 0) {
- if (kill_and_sigcont(s->exec_context.kill_mode == KILL_PROCESS_GROUP ?
- -s->control_pid :
- s->control_pid, sig) < 0 && errno != ESRCH)
+ if (kill_and_sigcont(s->control_pid, sig) < 0 && errno != ESRCH)
log_warning("Failed to kill control process %li: %m", (long) s->control_pid);
else
log_warning("Failed to kill control process %li: %m", (long) s->control_pid);
else
@@
-1285,7
+1284,7
@@
static int swap_kill(Unit *u, KillWho who, KillMode mode, int signo, DBusError *
}
if (s->control_pid > 0)
}
if (s->control_pid > 0)
- if (kill(
mode == KILL_PROCESS_GROUP ? -s->control_pid :
s->control_pid, signo) < 0)
+ if (kill(s->control_pid, signo) < 0)
r = -errno;
if (mode == KILL_CONTROL_GROUP) {
r = -errno;
if (mode == KILL_CONTROL_GROUP) {