s4-ldb: use ldb_wrap_fork_hook() to cancel child transactions
[ira/wip.git] / source4 / lib / ldb_wrap.c
index 0427a9c37838ab2955bd1cb80e8288ea5049ee6b..1166acd3a2281503205d081bd5defbc901f9ba47 100644 (file)
@@ -260,6 +260,10 @@ struct ldb_context *ldb_wrap_connect(TALLOC_CTX *mem_ctx,
  */
 void ldb_wrap_fork_hook(void)
 {
-       
+       struct ldb_wrap *w;
+
+       for (w=ldb_wrap_list; w; w=w->next) {
+               ldb_transaction_cancel_noerr(w->ldb);
+       }       
 }