chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
random: do not print warning if random seed doesn't exist yet
[elogind.git]
/
src
/
socket.c
diff --git
a/src/socket.c
b/src/socket.c
index 130f51c0789927ded5e5375ede69498a372bcac0..72be0e2235f28266776dc8eb847fe85fac08d24b 100644
(file)
--- a/
src/socket.c
+++ b/
src/socket.c
@@
-42,6
+42,7
@@
#include "bus-errors.h"
#include "label.h"
#include "exit-status.h"
#include "bus-errors.h"
#include "label.h"
#include "exit-status.h"
+#include "def.h"
static const UnitActiveState state_translation_table[_SOCKET_STATE_MAX] = {
[SOCKET_DEAD] = UNIT_INACTIVE,
static const UnitActiveState state_translation_table[_SOCKET_STATE_MAX] = {
[SOCKET_DEAD] = UNIT_INACTIVE,
@@
-1039,9
+1040,7
@@
static void socket_enter_signal(Socket *s, SocketState state, bool success) {
int sig = (state == SOCKET_STOP_PRE_SIGTERM || state == SOCKET_FINAL_SIGTERM) ? s->exec_context.kill_signal : SIGKILL;
if (s->control_pid > 0) {
int sig = (state == SOCKET_STOP_PRE_SIGTERM || state == SOCKET_FINAL_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
@@
-1836,7
+1835,7
@@
static int socket_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) {