notify-example: also send STOPPING=1 at exit
authorLennart Poettering <lennart@poettering.net>
Wed, 3 Apr 2024 13:54:49 +0000 (15:54 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Wed, 3 Apr 2024 14:52:07 +0000 (15:52 +0100)
commit47fba8f9253a3a9f08a39f5ee5a13e9286c046b7
tree5262b0d80aa82888a28b335305b2f37185195611
parent2dcc499bb890bb57972de4378c885173a795b459
notify-example: also send STOPPING=1 at exit

I think the example should reflect the full set of lifecycle messages,
including STOPPING=1, which tells the service manager that the service
is already terminating. This is useful for reporting this information
back to the user and to suppress repeated shutdown requests.

It's not as important as the READY=1 and RELOADING=1 messages, since we
actively wait for those from the service message if the right Type= is
set. But it's still very valuable information, easy to do, and completes
the state engine.
man/notify-selfcontained-example.c