Home GnuPG
Diffusion GnuPG 937aeb1904eb

common: Add an info callback to dotlock.

Description

common: Add an info callback to dotlock.

* common/dotlock.h (enum dotlock_reasons): New.
(DOTLOCK_PREPARE_CREATE): New flag.
* common/dotlock.c (struct dotlock_handle): Add info_cb and
info_cb_value.
(dotlock_create): Support the new flag.
(dotlock_finish_create): New.
(read_lockfile): Silence in case of ENOENT.
(dotlock_set_info_cb): New.  Use callback after all error and info
messages.
(dotlock_take_unix, dotlock_take_w32): Allow termination by callback.

Details

Provenance
wernerAuthored on Dec 13 2023, 10:08 AM
Parents
rGf57717bf2314: common: Improve error return for dotlock.
Branches
Unknown
Tags
Unknown