[libhif] Exit again on SIGINT/SIGTERM

A major (if not the biggest) point of this endeavor is to support
atomic/idempotent operation.
This commit is contained in:
Colin Walters 2015-01-01 21:13:17 -05:00
parent 7e0a55cd64
commit 0ff3d1de33

View File

@ -160,6 +160,12 @@ install_packages_in_root (RpmOstreeTreeComposeContext *self,
if (!hif_context_setup (hifctx, cancellable, error))
goto out;
/* Forcibly override rpm/librepo SIGINT handlers. We always operate
* in a fully idempotent/atomic mode, and can be killed at any time.
*/
signal (SIGINT, SIG_DFL);
signal (SIGTERM, SIG_DFL);
/* Bind the json \"repos\" member to the hif state, which looks at the
* enabled= member of the repos file. By default we forcibly enable
* only repos which are specified, ignoring the enabled= flag.