target / lorri

Your project's nix-env
Apache License 2.0
992 stars 69 forks source link

feat(sigterm): daemon exits with 0 on SIGINT or SIGTERM #471

Closed tshaynik closed 4 years ago

tshaynik commented 4 years ago

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

Checklist