Re: [EXTERNAL] Re: ExecStop doesn't get called when service crashes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Reindl,

Thank for the clarification.

The documentation mentions the below quote which lead to the confusion. Also, it doesn't explain why systemd-216 invokes ExecStop but not systemd-244 when the process is killed.

"Also note that the stop operation is always performed if the service started successfully, even if the processes in the service terminated on their own or were killed."

Regards,
Vinothkumar
-----Original Message-----
From: systemd-devel <systemd-devel-bounces@xxxxxxxxxxxxxxxxxxxxx> On Behalf Of Reindl Harald
Sent: 10 June 2020 14:25
To: systemd-devel@xxxxxxxxxxxxxxxxxxxxx
Subject: Re:  [EXTERNAL] Re: ExecStop doesn't get called when service crashes


Am 10.06.20 um 09:59 schrieb Baskaran, Vinothkumar:
> Apologies if I the subject is misleading.
>
> I meant that when the main process in the service gets crashed, ExecStop doesn't get invoked.

jesus that's exactly what the docs say

* ExecStop: clean stop of the service
* ExecStopPost: any case

>> ExecStop=
>> Note that the commands specified in ExecStop= are only executed when
>> the service started successfully first. They are not invoked if the
>> service was never started at all, or in case its start-up failed, for
>> example because any of the commands specified in ExecStart=,
>> ExecStartPre= or ExecStartPost= failed (and weren't prefixed with
>> "-", see above) or timed out. Use ExecStopPost= to invoke commands
>> when a service failed to start up correctly and is shut down again
>>
>> ExecStopPost=
>> Additional commands that are executed after the service is stopped.
>> This includes cases where the commands configured in ExecStop= were
>> used, where the service does not have any ExecStop= defined, or where
>> the service exited unexpectedly

_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://urldefense.com/v3/__https://lists.freedesktop.org/mailman/listinfo/systemd-devel__;!!CQl3mcHX2A!XkEdT3Ae8zzRDzK9pu-TucQN3IpTfA5eVxTbQU-6Qj6r6H4vOlJO8MzufQzaJcMOP-1pwJzFtg$
_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux