* Sebastian Hammer, Adam Dickmeiss
*
* $Log: main.c,v $
- * Revision 1.26 1995-12-06 12:41:23 adam
+ * Revision 1.27 1995-12-07 17:38:47 adam
+ * Work locking mechanisms for concurrent updates/commit.
+ *
+ * Revision 1.26 1995/12/06 12:41:23 adam
* New command 'stat' for the index program.
* Filenames can be read from stdin by specifying '-'.
* Bug fix/enhancement of the transformation from terms to regular
}
data1_tabpath = res_get (common_resource, "profilePath");
rval = res_get (common_resource, "commitEnable");
+
+ zebraIndexLock (1);
if (rval && atoi(rval))
+ {
+ zebraIndexLockMsg ("r");
bf_cache ();
+ }
+ else
+ zebraIndexLockMsg ("w");
}
if (!strcmp (arg, "update"))
cmd = 'u';
else if (!strcmp (arg, "commit"))
{
logf (LOG_LOG, "Commit");
+ zebraIndexLockMsg ("c");
bf_commit ();
}
else if (!strcmp (arg, "stat") || !strcmp (arg, "status"))
exit (1);
}
}
+ zebraIndexUnlock (1);
exit (0);
}