aboutsummaryrefslogtreecommitdiffstats
path: root/common/dotlock.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* common: Enhance dotlock, so that we can have a CLI util.NIIBE Yutaka2023-12-191-1/+4
| | | | | | | | | | | | | | | | * common/dotlock.h (DOTLOCK_LOCK_BY_PARENT, DOTLOCK_LOCKED): New. * common/dotlock.c [HAVE_POSIX_SYSTEM]: Include <dirent.h>. (dotlock_get_process_id, dotlock_detect_tname): New. (dotlock_create_unix): Handle the case when no_write option is specified. Not creating the lock file, but detect the the file of tname. (dotlock_create) [HAVE_POSIX_SYSTEM]: Add support of DOTLOCK_LOCK_BY_PARENT and DOTLOCK_LOCKED for dotlock CLI util. (dotlock_take_unix): Support the case of DOTLOCK_LOCK_BY_PARENT. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* common: Add an info callback to dotlock.Werner Koch2023-12-181-0/+20
| | | | | | | | | | | | | * 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.
* Clarify text of LGPLv2+/GPLv2+ licensed files.Werner Koch2017-02-241-2/+2
| | | | --
* Change all http://www.gnu.org in license notices to https://Werner Koch2016-11-051-1/+1
| | | | --
* common: Remove JNLIB from boiler plate (jnlib merge).Werner Koch2015-04-241-6/+6
| | | | | | | * common/README.jnlib: Remove. -- This is the final part of merging jnlib into gnupg/common.
* Change all quotes in strings and comments to the new GNU standard.Werner Koch2012-06-051-1/+1
| | | | | | | | | | | | | | | | | | | The asymmetric quotes used by GNU in the past (`...') don't render nicely on modern systems. We now use two \x27 characters ('...'). The proper solution would be to use the correct Unicode symmetric quotes here. However this has the disadvantage that the system requires Unicode support. We don't want that today. If Unicode is available a generated po file can be used to output proper quotes. A simple sed script like the one used for en@quote is sufficient to change them. The changes have been done by applying sed -i "s/\`\([^'\`]*\)'/'\1'/g" to most files and fixing obvious problems by hand. The msgid strings in the po files were fixed with a similar command.
* Allow distribution of dotlock.* also under a modified BSD licenseWerner Koch2011-10-241-0/+36
|
* Change JNLIB license to LGPLv3+ or GPLv2+.Werner Koch2011-09-301-6/+17
| | | | This is to allow the use of this code with code under GPLv2(only).
* Add prefix macro for dotlock functions.Werner Koch2011-09-301-0/+28
| | | | Also fixed a type in the GLIB version.
* Add dotlock_get_fd and dotlock_set_fd.Werner Koch2011-09-291-0/+2
|
* Add a flag parameter to dotlock_create.Werner Koch2011-09-281-2/+2
| | | | This allows us to extend this function in the future.
* Improved the dotlock module.Werner Koch2011-09-271-2/+4
| | | | | | | - It is now more portable and may be used outside of GnuPG - vfat file systems are now supported. - The use of link(2) is more robust. - Wrote extensive documentation.
* Renamed the lock functions.Werner Koch2011-09-231-8/+8
| | | | Also cleaned up the dotlock code for easier readability.
* Merged jnlib into common.Werner Koch2010-03-101-0/+33