[systemd-devel] ExecStop doesn't get called when service crashes
Baskaran, Vinothkumar
Vinothkumar_Baskaran at comcast.com
Tue Jun 9 16:07:06 UTC 2020
Hi,
I am using systemd-244 in embedded linux yocto 3.1. Here, ExecStop doesn't get invoked when the process CcspCrSsp is killed. However, when service is restarted/stopped using 'systemctl', it gets invoked successfully. The system has many services with ExecStop and it doesn't gets invoked in any of them. I have pasted one of the unit file here. Please let me know if I am missing anything.
Note: systemd-216 in yocto 1.6 doesn't have this issue.
[Unit]
Description=CcspCrSsp service
[Service]
Type=forking
PIDFile=/var/tmp/CcspCrSsp.pid
WorkingDirectory=/usr/ccsp
Environment="Subsys=eRT."
Environment="LOG4C_RCPATH=/etc"
EnvironmentFile=/etc/device.properties
ExecStartPre=-/bin/sh -c 'mkdir -p /rdklogs/logs/'
ExecStartPre=/bin/sh -c '(/usr/ccsp/ccspSysConfigEarly.sh)'
ExecStart=/usr/bin/CcspCrSsp -subsys $Subsys
ExecStop=/bin/sh -c 'echo 0 >> /tmp/CcspCrSsp_Restarted'
Restart=always
StandardOutput=syslog+console
[Install]
WantedBy=StartCcspService.target
Thanks,
Vinothkumar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20200609/0ded9ded/attachment.htm>
More information about the systemd-devel
mailing list