Overall the series made a lot of sense.
On a few points I raised:
- I still think that exposing the implementation detail of the
lockfile API that it builds on tempfile API is going backwards.
I wonder if a few helper functions added to the lockfile
API to hide it, e.g. instead of letting the caller say
"lk->tempfile.fd", have them call "lockfile_fd(lk)", would make
things even more clean.
- The tempfile API could be built on yet another layer of
clean_on_exit_file API to unconfuse me on "register_tempfile()",
but I do not think it is worth it only for two existing callers
(gc and credential).
Thanks.