dbh_close(3)
π dbh_close β bestie, we're closing the table π
okay so this is the DBHashTables Programmers' Manual page for dbh_close(3), and honestly? it's giving "short and sweet and does exactly what it says." two little functions, one job each, no drama. π
β¨ NAME β¨
dbh_close, dbh_destroy β close or remove an open DBHashTable π¦
like. one of them closes it, one of them closes it and deletes it off the face of the disk. yin and yang fr fr. π
πΈ SYNOPSIS πΈ
#include <dbh.h>
int dbh_close (DBHashTable *dbh);
int dbh_destroy (DBHashTable *dbh);
both of them take a DBHashTable *dbh and both hand you back an int. that's the whole vibe check. β¨
π DESCRIPTION π
so dbh_close will close the DBHashTable file. and bestie, "close" here is doing real work β it's flushing the io buffer. so like, all that stuff you wrote? it's actually hitting the disk now. no cap. πΎβ¨
then we got dbh_destroy, and she's the unhinged one (affectionate). dbh_destroy will close an open DBHashTable and erase the file from disk. like, gone gone. π
it's a convenience function that does a close and rm. that's literally the description, i'm not even embellishing. she's the "close the tab and delete the draft" of Unix functions. π«Ά
β οΈ bestie listen.dbh_destroyis not playing around β the file is erased from disk. if you wanted it back you should've calleddbh_close. i'm just saying. π
π₯ RETURN VALUE π₯
0β if error π1β otherwise π
yes it's flipped from what your brain expects. zero means it went bad. one means we ate. that's the API, i don't make the rules. π
π SEE ALSO π
dbh(0)dbh_create(3)dbh_open(3)dbh_open_ro(3)
go read these if you wanna know how the table got opened in the first place, iykyk π
π Author π
Edscott Wilson Garcia <edscott@xfce.org> β the icon, the moment, the main character. π
and that's the page!! this came out of the DBH manual, version DBH, filed under dbh_close(3), and it was written by the DBH crew. periodt. ππβ¨
π¦ where this page comes from
- fedora 43: dbh-devel 1:5.0.16-24.fc43 Β· GPL-3.0-or-later
- fedora 43: dbh-devel 1:5.0.16-24.fc43 Β· GPL-3.0-or-later
- fedora 43: dbh-devel 1:5.0.22-1.fc43 Β· GPL-3.0-or-later
- fedora 43: dbh-devel 1:5.0.22-1.fc43 Β· GPL-3.0-or-later
- fedora 44: dbh-devel 1:5.0.22-3.fc44 Β· GPL-3.0-or-later
- fedora 44: dbh-devel 1:5.0.22-3.fc44 Β· GPL-3.0-or-later
- Copyright (c) 2010 Edscott Wilson Garcia (edscott@xfce.org)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms