summaryrefslogtreecommitdiff
path: root/source3/lib/util_tdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/util_tdb.c')
-rw-r--r--source3/lib/util_tdb.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/lib/util_tdb.c b/source3/lib/util_tdb.c
index 6aa7a5348f..35c1a92ad5 100644
--- a/source3/lib/util_tdb.c
+++ b/source3/lib/util_tdb.c
@@ -72,6 +72,7 @@ static int tdb_chainlock_with_timeout_internal( TDB_CONTEXT *tdb, TDB_DATA key,
if (timeout) {
CatchSignal(SIGALRM, SIGNAL_CAST gotalarm_sig);
+ tdb_setalarm_sigptr(tdb, &gotalarm);
alarm(timeout);
}
@@ -82,6 +83,7 @@ static int tdb_chainlock_with_timeout_internal( TDB_CONTEXT *tdb, TDB_DATA key,
if (timeout) {
alarm(0);
+ tdb_setalarm_sigptr(tdb, NULL);
CatchSignal(SIGALRM, SIGNAL_CAST SIG_IGN);
if (gotalarm) {
DEBUG(0,("tdb_chainlock_with_timeout_internal: alarm (%u) timed out for key %s in tdb %s\n",