TDB_CHAINLOCK(3)
π tdb_chainlock β the manual page, but make it make sense π
okay bestie, welcome to tdb_chainlock(3), straight outta the Linux Programmer's Manual. this is the page about locking a whole lil group of keys at once, and honestly? it's giving power. π
β¨ NAME β¨
tdb_chainlock β lock a group of keys
tdb_chainunlock β unlock a previously locked group of keys
πΈ SYNOPSIS πΈ
#include <tdb.h>
int tdb_chainlock(TDB_CONTEXT *tdb, TDB_DATA key);
void tdb_chainunlock(TDB_CONTEXT *tdb, TDB_DATA key);
like yes, that's the whole vibe check. two functions, one job. π«Ά
π DESCRIPTION π
okay so tdb_chainlock is a low-level function, and when i say low-level i mean it is not here to hold your hand. it locks a particular key β and, plot twist, a number of other keys too β without any checking. no vibes check, no safety net, just lock. π
the consequence? any other process that tries to do tdb operations on those keys is gonna block until tdb_chainunlock gets called. so it's just sitting there, waiting, like a bestie outside the fitting room. π§ββοΈ
π NOTES π
β οΈ bestie, listen to me. it is the user's responsibility to make sure you do not deadlock the database with these functions. that's on you, not on tdb. no cap. π
and here's the wild part β that kind of deadlock is something which is impossible when you use the other access functions. so likeβ¦ these two are the chaotic ones. the main character energy is real but so is the risk. π
π RETURN VALUE π
0β success, slay, we ate. β¨-1β failure. it's giving tragedy. π
π¦ AUTHORS π¦
- Software: Andrew Tridgell
<tridge@linuxcare.com> - Man page: Rusty.
β SEE ALSO β
go read those too, iykyk. π
this page came to you courtesy of Samba, dated Oct 13, 2000 β yeah she's an icon from another era and she still serves. periodt. π
π¦ where this page comes from
- debian trixie: libtdb-dev 2:1.4.13+samba4.22.10+dfsg-0+deb13u2 Β· GPL-3.0-or-later
- debian trixie: libtdb-dev 2:1.4.13+samba4.22.11+dfsg-0+deb13u1 Β· GPL-3.0-or-later
- ubuntu questing: libtdb-dev 2:1.4.13+samba4.22.3+dfsg-4ubuntu2
- ubuntu questing: libtdb-dev 2:1.4.13+samba4.22.3+dfsg-4ubuntu2.4
- ubuntu resolute: libtdb-dev 2:1.4.14+samba4.23.6+dfsg-1ubuntu2 Β· GPL-3.0-or-later
- ubuntu resolute: libtdb-dev 2:1.4.14+samba4.23.6+dfsg-1ubuntu2.2 Β· GPL-3.0-or-later
- ubuntu stonking: libtdb-dev 2:1.4.15+samba4.24.7+dfsg-1ubuntu1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms