Make the lorri daemon subcommand exit with 0 on SIGINT
or SIGTERM.
Other lorri subcommands preserve the default SIGINT
and SIGTERM behaviors.
This change is done adds the ctrlc
crate, by Antti Keränen, as a dependency. This crate provides a simple
and safe interface for handling SIGINT and SIGTERM.
An alternative to the ctrlc crate would be to implement the response to the signals
using the the nix crate, which is already a lorri dependency.
The downside of this would be adding unsafe code to the codebase.
Closes #463 .
Overview
added the ctrlc crate as a dependency
added a function that exits with 0 for SIGINT or SIGTERM
call that function on the Daemon arm of the match statement in run_command()
Checklist
[ ] Updated the documentation (code documentation, command help, ...)
[ ] Tested the change (unit or integration tests)
[x] Amended the changelog in release.nix (see release.nix for instructions)
Make the
lorri daemon
subcommand exit with 0 on SIGINT or SIGTERM.Other
lorri
subcommands preserve the default SIGINT and SIGTERM behaviors.This change is done adds the ctrlc crate, by Antti Keränen, as a dependency. This crate provides a simple and safe interface for handling SIGINT and SIGTERM.
An alternative to the
ctrlc
crate would be to implement the response to the signals using the thenix
crate, which is already a lorri dependency. The downside of this would be addingunsafe
code to the codebase.Closes #463 .
Overview
run_command()
Checklist
release.nix
(seerelease.nix
for instructions)