RPM_GNUC_NORETURN static void die(PyObject *cb) { char *pyfn = NULL; PyObject *r; if (PyErr_Occurred()) { PyErr_Print(); } if ((r = PyObject_Repr(cb)) != NULL) { pyfn = PyBytes_AsString(r); } fprintf(stderr, _("error: python callback %s failed, aborting!\n"), pyfn ? pyfn : "???"); rpmdbCheckTerminate(1); exit(EXIT_FAILURE); }
void rpm_destroy() { #ifdef HAVE_LIBRPM /* Mirroring the order of deinit calls in rpm-4.11.1/lib/poptALL.c::rpmcliFini() */ rpmFreeCrypto(); rpmFreeMacros(NULL); rpmFreeRpmrc(); /* rpm >= 4.14 handles this automatically on exit */ #if 0 /* RPM doc says "clean up any open iterators and databases". * Observed to eliminate these Berkeley DB warnings: * "BDB2053 Freeing read locks for locker 0x1e0: 28718/139661746636736" */ rpmdbCheckTerminate(1); #endif #endif list_free_with_free(list_fingerprints); list_fingerprints = NULL; }
/* * Force clean up of open iterators and dbs on exit. */ static void rpm_exithook(void) { rpmdbCheckTerminate(1); }