summaryrefslogtreecommitdiff
path: root/rpmdb/rpmdb.h
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2007-07-21 15:05:19 +0300
committerPanu Matilainen <pmatilai@redhat.com>2007-07-21 15:05:19 +0300
commit0ef67980e8a428985886482f33ebf8cdce979f7b (patch)
treec0a29353c10f03e366d5d422d1983c498b403f86 /rpmdb/rpmdb.h
parent6fdd71bbeef3d1c1b731b9fbbbfad792715c3a1f (diff)
downloadlibrpm-tizen-0ef67980e8a428985886482f33ebf8cdce979f7b.tar.gz
librpm-tizen-0ef67980e8a428985886482f33ebf8cdce979f7b.tar.bz2
librpm-tizen-0ef67980e8a428985886482f33ebf8cdce979f7b.zip
Make rpmdbCheckTerminate() non-terminating.
This allows use in exit handler without affecting exit code, and permits caller to do its own cleanup if necessary.
Diffstat (limited to 'rpmdb/rpmdb.h')
-rw-r--r--rpmdb/rpmdb.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/rpmdb/rpmdb.h b/rpmdb/rpmdb.h
index 5fcf74436..ad428dfea 100644
--- a/rpmdb/rpmdb.h
+++ b/rpmdb/rpmdb.h
@@ -1039,8 +1039,7 @@ Header rpmdbNextIterator(/*@null@*/ rpmdbMatchIterator mi)
/*@modifies mi, rpmGlobalMacroContext, fileSystem, internalState @*/;
/** \ingroup rpmdb
- * Check rpmdb signal handler for trapped signal exit. Just a compatibility
- * wrapper for rpmdbCheckTerminate()
+ * Check for and exit on termination signals.
*/
/*@mayexit@*/
int rpmdbCheckSignals(void)
@@ -1048,10 +1047,13 @@ int rpmdbCheckSignals(void)
/*@modifies fileSystem, internalState @*/;
/** \ingroup rpmdb
- * Check rpmdb signal handler for trapped signal or requested exit.
+ * Check rpmdb signal handler for trapped signal and/or requested exit,
+ * clean up any open iterators and databases on termination condition.
+ * On non-zero exit any open references to rpmdb are invalid and cannot
+ * be accessed anymore, calling process should terminate immediately.
* @param terminate 0 to only check for signals, 1 to terminate anyway
+ * @return 0 to continue, 1 if termination cleanup was done.
*/
-/*@mayexit@*/
int rpmdbCheckTerminate(int terminate);
/** \ingroup rpmdb