[systemd-devel] systemd-sysv-generator bug ?
Benoit SCHMID
Benoit.Schmid at unige.ch
Tue Nov 22 09:34:41 UTC 2016
Hello,
On 11/22/2016 09:15 AM, Andrei Borzenkov wrote:
> Assuming that your command survives normal session exit - does adding
> "After=user.slice" to your service helps? This should ensure your
> service is stopped before any user processes.
With "After=system.slice local-fs.target network-online.target
systemd-journald.socket user.slice basic.target",
my process is still killed by systemd before my stop script is started.
This is my process status, before running init 6:
CGroup: /
├─1 /usr/lib/systemd/systemd --switched-root --system
--deserialize 2
├─user.slice
│ ├─user-0.slice
│ │ └─session-2.scope
│ │ ├─15483 sshd: root at pts/0
│ │ ├─15485 -bash
│ │ ├─15783 /usr/bin/perl /usr/local/bin/write-sysv-test.pl
│ │ ├─15800 systemctl status
│ │ └─15801 less
# systemctl status sysv-test.service
● sysv-test.service - sysv-test
Loaded: loaded (/etc/systemd/system/sysv-test.service; enabled;
vendor preset: disabled)
Active: active (exited) since Tue 2016-11-22 10:18:39 CET; 12min ago
Process: 13688 ExecStart=/usr/bin/true (code=exited, status=0/SUCCESS)
Main PID: 13688 (code=exited, status=0/SUCCESS)
CGroup: /system.slice/sysv-test.service
Nov 22 10:18:39 spinelle1 systemd[1]: Started sysv-test.
Nov 22 10:18:39 spinelle1 systemd[1]: Starting sysv-test...
# systemctl show sysv-test.service | grep -i after
RemainAfterExit=yes
After=system.slice local-fs.target network-online.target
systemd-journald.socket user.slice basic.target
Would you know why it is still killed before running my stop script?
Regards,
--
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Benoit Schmid Tel: (+41-22) 379-7209
University of Geneva - Information Technology Division
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
More information about the systemd-devel
mailing list