chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1223504
)
exec: drop process group kill mode since it has little use and confuses the user
author
Lennart Poettering
<lennart@poettering.net>
Tue, 29 Mar 2011 21:31:38 +0000
(23:31 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Tue, 29 Mar 2011 21:31:38 +0000
(23:31 +0200)
18 files changed:
TODO
patch
|
blob
|
history
man/systemctl.xml
patch
|
blob
|
history
man/systemd.mount.xml
patch
|
blob
|
history
man/systemd.service.xml
patch
|
blob
|
history
man/systemd.socket.xml
patch
|
blob
|
history
man/systemd.swap.xml
patch
|
blob
|
history
src/execute.c
patch
|
blob
|
history
src/execute.h
patch
|
blob
|
history
src/mount.c
patch
|
blob
|
history
src/service.c
patch
|
blob
|
history
src/socket.c
patch
|
blob
|
history
src/swap.c
patch
|
blob
|
history
src/systemctl-bash-completion.sh
patch
|
blob
|
history
units/console-shell.service.m4
patch
|
blob
|
history
units/emergency.service
patch
|
blob
|
history
units/getty@.service.m4
patch
|
blob
|
history
units/rescue.service.m4
patch
|
blob
|
history
units/serial-getty@.service.m4
patch
|
blob
|
history
diff --git
a/TODO
b/TODO
index eeb6c0728ff43252731daf24c735d6d87e410a11..4302eeefe2dfd8af67e7fe6b41a956dbe025194f 100644
(file)
--- a/
TODO
+++ b/
TODO
@@
-12,8
+12,6
@@
F15:
* hook emergency.target into local-fs.target in some way as OnFailure with isolate
* hook emergency.target into local-fs.target in some way as OnFailure with isolate
-* drop SIGHUP handling from rsyslog.service upstream (PENDING)
-
* teach dbus to activate all services it finds in /etc/systemd/services/org-*.service
* save/restore tool for SysV as requested by FPC (PENDING)
* teach dbus to activate all services it finds in /etc/systemd/services/org-*.service
* save/restore tool for SysV as requested by FPC (PENDING)
@@
-27,8
+25,6
@@
F15:
* document default dependencies
* document default dependencies
-* remove KillMode=process-group
-
* kernel patch wegen kmsg prio nach f15
* LOG_DAEMON/LOG_USER für kmsg messages schreiben
* kernel patch wegen kmsg prio nach f15
* LOG_DAEMON/LOG_USER für kmsg messages schreiben
@@
-41,8
+37,6
@@
Features:
* when key file cannot be found, read it from kbd in cryptsetup
* when key file cannot be found, read it from kbd in cryptsetup
-* hide passwords on TAB
-
* get rid of random file name in generator directory?
/run/systemd/generator-IH1vFu
* get rid of random file name in generator directory?
/run/systemd/generator-IH1vFu
diff --git
a/man/systemctl.xml
b/man/systemctl.xml
index 535f9bd13be8dc3b15d15a9f899fd42d614b5b59..922fd2d68a0ff0eaee5d585b59997ae9aa2f5182 100644
(file)
--- a/
man/systemctl.xml
+++ b/
man/systemctl.xml
@@
-304,13
+304,11
@@
<command>kill</command>, choose the
mode how to kill the selected
processes. Must be one of
<command>kill</command>, choose the
mode how to kill the selected
processes. Must be one of
- <option>control-group</option>,
- <option>process-group</option> or
+ <option>control-group</option> or
<option>process</option> to select
whether to kill the entire control
<option>process</option> to select
whether to kill the entire control
- group, the process group or only the
- selected process itself. If omitted
- defaults to
+ group or only the selected process
+ itself. If omitted defaults to
<option>control-group</option> if
<option>--kill-who=all</option> is
set, or <option>process</option>
<option>control-group</option> if
<option>--kill-who=all</option> is
set, or <option>process</option>
diff --git
a/man/systemd.mount.xml
b/man/systemd.mount.xml
index c7045e84220a2f61c6b20ffcd1864afa6f742942..dd66d2ad72c11030f83e0d3f12822dece1f0d977 100644
(file)
--- a/
man/systemd.mount.xml
+++ b/
man/systemd.mount.xml
@@
-221,7
+221,6
@@
processes of this mount shall be
killed. One of
<option>control-group</option>,
processes of this mount shall be
killed. One of
<option>control-group</option>,
- <option>process-group</option>,
<option>process</option>,
<option>none</option>.</para>
<option>process</option>,
<option>none</option>.</para>
diff --git
a/man/systemd.service.xml
b/man/systemd.service.xml
index e444efeb44e70d95aaec0971130b072f1ecc43f1..7458720a3f3188b4fec13bef5e91c32cf4f23924 100644
(file)
--- a/
man/systemd.service.xml
+++ b/
man/systemd.service.xml
@@
-558,7
+558,6
@@
processes of this service shall be
killed. One of
<option>control-group</option>,
processes of this service shall be
killed. One of
<option>control-group</option>,
- <option>process-group</option>,
<option>process</option>,
<option>none</option>.</para>
<option>process</option>,
<option>none</option>.</para>
@@
-570,10
+569,6
@@
stop command (as configured with
<varname>ExecStop=</varname>) is
executed. If set to
stop command (as configured with
<varname>ExecStop=</varname>) is
executed. If set to
- <option>process-group</option> only
- the members of the process group of
- the main service process are
- killed. If set to
<option>process</option> only the main
process itself is killed. If set to
<option>none</option> no process is
<option>process</option> only the main
process itself is killed. If set to
<option>none</option> no process is
diff --git
a/man/systemd.socket.xml
b/man/systemd.socket.xml
index 3b7581c54512b613e4bbdfd1de1c7f3e264474f5..8cbb512ec157c9aaab28f7e06fcb052ea64f775d 100644
(file)
--- a/
man/systemd.socket.xml
+++ b/
man/systemd.socket.xml
@@
-519,7
+519,6
@@
processes of this socket unit shall be
killed. One of
<option>control-group</option>,
processes of this socket unit shall be
killed. One of
<option>control-group</option>,
- <option>process-group</option>,
<option>process</option>,
<option>none</option>.</para>
<option>process</option>,
<option>none</option>.</para>
diff --git
a/man/systemd.swap.xml
b/man/systemd.swap.xml
index d95e39ed8ed4a0d3f015995ad570d5f515b0305c..3277ddbd4e247f7c2765ba053cb83eed3efcc517 100644
(file)
--- a/
man/systemd.swap.xml
+++ b/
man/systemd.swap.xml
@@
-175,7
+175,6
@@
processes of this swap shall be
killed. One of
<option>control-group</option>,
processes of this swap shall be
killed. One of
<option>control-group</option>,
- <option>process-group</option>,
<option>process</option>,
<option>none</option>.</para>
<option>process</option>,
<option>none</option>.</para>
diff --git
a/src/execute.c
b/src/execute.c
index a467411f7dab13c238a8094f480240e4b8ad7cb9..cd44640a53088062b155d8306b920a1df906079e 100644
(file)
--- a/
src/execute.c
+++ b/
src/execute.c
@@
-1933,7
+1933,6
@@
DEFINE_STRING_TABLE_LOOKUP(exec_output, ExecOutput);
static const char* const kill_mode_table[_KILL_MODE_MAX] = {
[KILL_CONTROL_GROUP] = "control-group",
static const char* const kill_mode_table[_KILL_MODE_MAX] = {
[KILL_CONTROL_GROUP] = "control-group",
- [KILL_PROCESS_GROUP] = "process-group",
[KILL_PROCESS] = "process",
[KILL_NONE] = "none"
};
[KILL_PROCESS] = "process",
[KILL_NONE] = "none"
};
diff --git
a/src/execute.h
b/src/execute.h
index 44856d11fab7322174db9afc1af6506232270232..208fe4ad5e1660710cd1f99181f0d7e954885520 100644
(file)
--- a/
src/execute.h
+++ b/
src/execute.h
@@
-43,7
+43,6
@@
struct CGroupBonding;
typedef enum KillMode {
KILL_CONTROL_GROUP = 0,
typedef enum KillMode {
KILL_CONTROL_GROUP = 0,
- KILL_PROCESS_GROUP,
KILL_PROCESS,
KILL_NONE,
_KILL_MODE_MAX,
KILL_PROCESS,
KILL_NONE,
_KILL_MODE_MAX,
diff --git
a/src/mount.c
b/src/mount.c
index cc49b1993fc2a8bbf3184d531bdf6c7249b38986..8528d17a804ffa9d796872c06bbeeca7319d4156 100644
(file)
--- a/
src/mount.c
+++ b/
src/mount.c
@@
-747,9
+747,7
@@
static void mount_enter_signal(Mount *m, MountState state, bool success) {
state == MOUNT_REMOUNTING_SIGTERM) ? m->exec_context.kill_signal : SIGKILL;
if (m->control_pid > 0) {
state == MOUNT_REMOUNTING_SIGTERM) ? m->exec_context.kill_signal : SIGKILL;
if (m->control_pid > 0) {
- if (kill_and_sigcont(m->exec_context.kill_mode == KILL_PROCESS_GROUP ?
- -m->control_pid :
- m->control_pid, sig) < 0 && errno != ESRCH)
+ if (kill_and_sigcont(m->control_pid, sig) < 0 && errno != ESRCH)
log_warning("Failed to kill control process %li: %m", (long) m->control_pid);
else
log_warning("Failed to kill control process %li: %m", (long) m->control_pid);
else
@@
-1684,7
+1682,7
@@
static int mount_kill(Unit *u, KillWho who, KillMode mode, int signo, DBusError
}
if (m->control_pid > 0)
}
if (m->control_pid > 0)
- if (kill(m
ode == KILL_PROCESS_GROUP ? -m->control_pid : m
->control_pid, signo) < 0)
+ if (kill(m->control_pid, signo) < 0)
r = -errno;
if (mode == KILL_CONTROL_GROUP) {
r = -errno;
if (mode == KILL_CONTROL_GROUP) {
diff --git
a/src/service.c
b/src/service.c
index 1735a96c80b930844d9d24d2d94e4d63692ed24e..fd3a9c94e7e2e7fc50d7df33ed80fee337e559fe 100644
(file)
--- a/
src/service.c
+++ b/
src/service.c
@@
-828,7
+828,7
@@
static int service_load_sysv_path(Service *s, const char *path) {
s->exec_context.std_output =
(s->meta.manager->sysv_console || s->exec_context.std_input == EXEC_INPUT_TTY)
? EXEC_OUTPUT_TTY : s->meta.manager->default_std_output;
s->exec_context.std_output =
(s->meta.manager->sysv_console || s->exec_context.std_input == EXEC_INPUT_TTY)
? EXEC_OUTPUT_TTY : s->meta.manager->default_std_output;
- s->exec_context.kill_mode = KILL_PROCESS
_GROUP
;
+ s->exec_context.kill_mode = KILL_PROCESS;
/* We use the long description only if
* no short description is set. */
/* We use the long description only if
* no short description is set. */
@@
-1838,19
+1838,14
@@
static void service_enter_signal(Service *s, ServiceState state, bool success) {
int sig = (state == SERVICE_STOP_SIGTERM || state == SERVICE_FINAL_SIGTERM) ? s->exec_context.kill_signal : SIGKILL;
if (s->main_pid > 0) {
int sig = (state == SERVICE_STOP_SIGTERM || state == SERVICE_FINAL_SIGTERM) ? s->exec_context.kill_signal : SIGKILL;
if (s->main_pid > 0) {
- if (kill_and_sigcont(s->exec_context.kill_mode == KILL_PROCESS_GROUP ?
- -s->main_pid :
- s->main_pid, sig) < 0 && errno != ESRCH)
-
+ if (kill_and_sigcont(s->main_pid, sig) < 0 && errno != ESRCH)
log_warning("Failed to kill main process %li: %m", (long) s->main_pid);
else
wait_for_exit = true;
}
if (s->control_pid > 0) {
log_warning("Failed to kill main process %li: %m", (long) s->main_pid);
else
wait_for_exit = true;
}
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
@@
-3212,11
+3207,11
@@
static int service_kill(Unit *u, KillWho who, KillMode mode, int signo, DBusErro
}
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 (s->main_pid > 0)
r = -errno;
if (s->main_pid > 0)
- if (kill(
mode == KILL_PROCESS_GROUP ? -s->main_pid :
s->main_pid, signo) < 0)
+ if (kill(s->main_pid, signo) < 0)
r = -errno;
if (mode == KILL_CONTROL_GROUP) {
r = -errno;
if (mode == KILL_CONTROL_GROUP) {
diff --git
a/src/socket.c
b/src/socket.c
index 9045a2fc85a3c7c454bcc8ccd4408676bb91236d..72be0e2235f28266776dc8eb847fe85fac08d24b 100644
(file)
--- a/
src/socket.c
+++ b/
src/socket.c
@@
-1040,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
@@
-1837,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) {
diff --git
a/src/swap.c
b/src/swap.c
index 035efbaf4b1a941d5cc68adefbd5b3e732a08bc3..66bf5c2bfbffae371099b118def1d499c975b32d 100644
(file)
--- a/
src/swap.c
+++ b/
src/swap.c
@@
-661,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
@@
-1286,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) {
diff --git
a/src/systemctl-bash-completion.sh
b/src/systemctl-bash-completion.sh
index f3420217b538640a55a75144686ff03988f9d337..ae0ecb7b70c4d0361e6fa4b9fd374f0fcdbcd015 100644
(file)
--- a/
src/systemctl-bash-completion.sh
+++ b/
src/systemctl-bash-completion.sh
@@
-60,7
+60,7
@@
_systemctl () {
comps='all control main'
;;
--kill-mode)
comps='all control main'
;;
--kill-mode)
- comps='control-group process
process-group
'
+ comps='control-group process'
;;
--property|-p)
comps=''
;;
--property|-p)
comps=''
diff --git
a/units/console-shell.service.m4
b/units/console-shell.service.m4
index c98a08fccc7e05bb369e6cd2430d0b455d88788c..cce2d5a5a44e95e9bb45b2fecff852626544005d 100644
(file)
--- a/
units/console-shell.service.m4
+++ b/
units/console-shell.service.m4
@@
-31,7
+31,7
@@
WorkingDirectory=/root
ExecStart=-/sbin/sulogin
ExecStopPost=-/bin/systemctl poweroff
StandardInput=tty-force
ExecStart=-/sbin/sulogin
ExecStopPost=-/bin/systemctl poweroff
StandardInput=tty-force
-KillMode=process
-group
+KillMode=process
# Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash
# terminates cleanly.
# Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash
# terminates cleanly.
diff --git
a/units/emergency.service
b/units/emergency.service
index cb28a783852a172bbe592a8ed7175b5c7fe669ed..a97ec5e389b4000387030bd746ec0022f8de2ae2 100644
(file)
--- a/
units/emergency.service
+++ b/
units/emergency.service
@@
-21,7
+21,7
@@
ExecStartPre=-/bin/echo 'Welcome to emergency mode. Use "systemctl default" or ^
ExecStart=-/sbin/sulogin
ExecStopPost=/bin/systemctl --fail default
StandardInput=tty-force
ExecStart=-/sbin/sulogin
ExecStopPost=/bin/systemctl --fail default
StandardInput=tty-force
-KillMode=process
-group
+KillMode=process
# Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash
# terminates cleanly.
# Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash
# terminates cleanly.
diff --git
a/units/getty@.service.m4
b/units/getty@.service.m4
index 1a8a6a0e9cf6f70af6fb5683d26959c3b03f689e..a9733a60d61041d2b178ab7f3852300a53768bcb 100644
(file)
--- a/
units/getty@.service.m4
+++ b/
units/getty@.service.m4
@@
-36,7
+36,7
@@
ExecStart=-/sbin/agetty %I 38400
Restart=always
RestartSec=0
UtmpIdentifier=%I
Restart=always
RestartSec=0
UtmpIdentifier=%I
-KillMode=process
-group
+KillMode=process
# Unset locale for the console getty since the console has problems
# displaying some internationalized messages.
# Unset locale for the console getty since the console has problems
# displaying some internationalized messages.
diff --git
a/units/rescue.service.m4
b/units/rescue.service.m4
index 969ac4728f7176d1fa83d9c06bfdc90bc64dfe8d..241c75071f635d42517ee8f830e7ec554388a62b 100644
(file)
--- a/
units/rescue.service.m4
+++ b/
units/rescue.service.m4
@@
-28,7
+28,7
@@
ExecStart=-/bin/bash -c "exec ${SINGLE}"',
`ExecStart=-/sbin/sulogin'))
ExecStopPost=-/bin/systemctl --fail default
StandardInput=tty-force
`ExecStart=-/sbin/sulogin'))
ExecStopPost=-/bin/systemctl --fail default
StandardInput=tty-force
-KillMode=process
-group
+KillMode=process
# Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash
# terminates cleanly.
# Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash
# terminates cleanly.
diff --git
a/units/serial-getty@.service.m4
b/units/serial-getty@.service.m4
index d42330a1ad6cd96505542e7118a77118493a6175..8b4f0fb9d52a244601c50e5ca328c82b402fd93f 100644
(file)
--- a/
units/serial-getty@.service.m4
+++ b/
units/serial-getty@.service.m4
@@
-36,7
+36,7
@@
ExecStart=-/sbin/agetty -s %I 115200,38400,9600
Restart=always
RestartSec=0
UtmpIdentifier=%I
Restart=always
RestartSec=0
UtmpIdentifier=%I
-KillMode=process
-group
+KillMode=process
# Some login implementations ignore SIGTERM, so we send SIGHUP
# instead, to ensure that login terminates cleanly.
# Some login implementations ignore SIGTERM, so we send SIGHUP
# instead, to ensure that login terminates cleanly.