Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package withlock for openSUSE:Factory checked in at 2026-11-26 15:55:34 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/withlock (Old) and /work/SRC/openSUSE:Factory/.withlock.new.1340718 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "withlock" Thu Nov 26 15:55:34 2026 rev:12 rq:1400864 version:0.6 Changes: -------- --- /work/SRC/openSUSE:Factory/withlock/withlock.changes 2023-01-02 15:02:13.037367445 +0100 +++ /work/SRC/openSUSE:Factory/.withlock.new.1340718/withlock.changes 2026-11-26 15:57:15.376539125 +0100 @@ -1,0 +2,20 @@ +Wed Nov 25 23:20:00 UTC 2026 - Peter Poeml <[email protected]> + +- Update to 0.6 (released tarball from mirrorbrain.org) + * Document known limitation: the lock file is unlinked at exit, which + leaves a sub-second window for overlapping jobs if several are + spawned per second. Harmless for cron jobs. Noted in README, man + page and the BUGS section + * Fold withlock-0.5-fixboo864785.patch into the sources: re-open the + lock file before every locking attempt (boo#864785) + * Add THANKS file, installed with the documentation + * Man page regenerated with ronn-ng + * Running under Python 3 is now required; the Python 2 version is + archived in attic/ + * Dropped: withlock-0.5-fixboo864785.patch +- Re-add fix-use-python3.patch: upstream keeps + "#!/usr/bin/env python3" for portability, the package uses the + absolute /usr/bin/python3 path (rpmlint: env-script-interpreter) + (prepared with help of rool.dev) + +------------------------------------------------------------------- Old: ---- withlock-0.5-fixboo864785.patch withlock-0.5.tar.gz New: ---- withlock-0.6.tar.gz ----------(Old B)---------- Old: page and the BUGS section * Fold withlock-0.5-fixboo864785.patch into the sources: re-open the lock file before every locking attempt (boo#864785) ----------(Old E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ withlock.spec ++++++ --- /var/tmp/diff_new_pack.7gcWiV/_old 2026-11-26 15:57:16.075568744 +0100 +++ /var/tmp/diff_new_pack.7gcWiV/_new 2026-11-26 15:57:16.077568829 +0100 @@ -1,7 +1,7 @@ # # spec file for package withlock # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2026 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,15 +17,14 @@ Name: withlock -Version: 0.5 +Version: 0.6 Release: 0 Summary: A locking wrapper script License: Apache-2.0 Group: System/Management URL: https://github.com/poeml/withlock -Source0: %{name}-%{version}.tar.gz +Source0: https://mirrorbrain.org/files/releases/%{name}-%{version}.tar.gz Patch0: fix-use-python3.patch -Patch1: withlock-0.5-fixboo864785.patch Requires: python3 BuildArch: noarch @@ -50,7 +49,7 @@ %files %license LICENSE-2.0.txt -%doc README.md withlock.1.html +%doc README.md THANKS withlock.1.html %{_bindir}/%{name} %{_mandir}/man1/%{name}.1%{?ext_man} ++++++ fix-use-python3.patch ++++++ --- /var/tmp/diff_new_pack.7gcWiV/_old 2026-11-26 15:57:16.098569719 +0100 +++ /var/tmp/diff_new_pack.7gcWiV/_new 2026-11-26 15:57:16.102569888 +0100 @@ -1,9 +1,9 @@ --- a/withlock +++ b/withlock @@ -1,4 +1,4 @@ --#!/usr/bin/env python +-#!/usr/bin/env python3 +#!/usr/bin/python3 - # Copyright 2009-2016 Peter Poeml + # Copyright 2009-2026 Peter Poeml # ++++++ withlock-0.5.tar.gz -> withlock-0.6.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/withlock-0.5/Makefile new/withlock-0.6/Makefile --- old/withlock-0.5/Makefile 2016-03-02 11:28:46.000000000 +0100 +++ new/withlock-0.6/Makefile 2026-11-26 00:10:43.000000000 +0100 @@ -10,7 +10,7 @@ MANDIR = $(PREFIX)/share/man INSTALL = install -RONN = ronn-1.9 +RONN = ronn-3.3 BIN = withlock MANPAGE = withlock.1 @@ -25,5 +25,5 @@ $(INSTALL) -d $(DESTDIR)$(mandir)/man1 $(INSTALL) -m 0644 $(MANPAGE) $(DESTDIR)$(mandir)/man1 $(INSTALL) -d $(DESTDIR)$(docdir)/withlock - $(INSTALL) -m 0644 withlock.1.html README.md LICENSE-2.0.txt $(DESTDIR)$(docdir)/withlock + $(INSTALL) -m 0644 withlock.1.html README.md LICENSE-2.0.txt THANKS $(DESTDIR)$(docdir)/withlock diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/withlock-0.5/README.md new/withlock-0.6/README.md --- old/withlock-0.5/README.md 2016-03-02 11:28:46.000000000 +0100 +++ new/withlock-0.6/README.md 2026-11-26 00:10:43.000000000 +0100 @@ -30,23 +30,30 @@ withlock has been tested on the following platforms: -* **Debian** Lenny (5.0) and later -* **Ubuntu** Jaunty Jackalope (9.04), Karmic Koala (9.10) and later -* **openSUSE** 10.1, 11.0, 11.1 and later -* **CentOS** 5.4 -* **FreeBSD** 8.0 -* **OSX** Leopard (10.5), Snow Leopard (10.6) +* **Debian** 5.0 and later +* **Ubuntu** 9.04 and later +* **openSUSE** 10.1 later +* **CentOS** 5 and later +* **FreeBSD** 8.0, probably also later +* **OSX** 10.5 and later * **OpenCSW Solaris** http://www.opencsw.org/packages/withlock/ -Quite likely, more platforms are supported. Please provide feedback if you know about one. +Quite likely, more platforms are supported. Please provide feedback if you know +about one. -withlock should run on every platform that has a Python interpreter of version 2.4 or newer. The requirement on Python 2.4 is for the subprocess module, which was introduced with that version. +withlock should run on every platform that has a Python 3 interpreter. -The most extensive testing has been performed on openSUSE with XFS and ext3 as underlying filesystems. On the other listed platforms, basic functionality has been verified. +The archived version in ATTIC should run everywhere where Python version 2.4 or +newer is available. (The requirement on Python 2.4 is for the subprocess +module, which was introduced with that version.) + +The most extensive testing has been performed on openSUSE with XFS and ext3 as +underlying filesystems. On the other listed platforms, basic functionality has +been verified. ## Download -wget http://mirrorbrain.org/files/releases/withlock-0.4.tar.gz +wget http://mirrorbrain.org/files/releases/withlock-0.6.tar.gz ## Simple install of the latest script from git master @@ -99,6 +106,23 @@ +## Known limitation + +The lock file is removed when withlock exits, and that removal happens while +the lock is still held. In that instant, a withlock starting up can create a +fresh file at the same path, lock it, and run alongside the job that is just +finishing. + +The window is sub-second. For what withlock is for -- cron jobs that start +minutes or hours apart -- it is far too small to matter in practice; you would +need to be spawning several jobs per second to hit it. + +If that is not good enough for your workload, the obvious solution is to stop +cleaning up: leave the empty lock file in place and let the lock die with the +process, which is what `flock(1)` does. There is no option for this yet. + + + ## History This wrapper was implemented because no comparable solution was found even after looking around for a long time (and suffering problems caused by missing or insufficient locking for years). The only solution that comes close is with-lock-ex.c, an implementation in C, which was written by Ian Jackson and placed in the public domain by him. with-lock-ex.c is traditionally available on Debian in a package named chiark-utils-bin. Parts of withlock's locking strategy and parts of the usage semantics were inspired from that program. This implementation was chosen to be done in Python because it's universally available, easy to adapt, and doesn't require to be compiled. @@ -134,6 +158,17 @@ ## Revision history +0.6, 2026: + +- use python 3, but stay portable with the path to it +- Re-open lock file before locking, + because the previous 'withlock' cleanup function might have deleted + the file and since we still held a handle to the old deleted file, + we could run concurrently with a 3rd 'withlock' which creates a new file. + Fixes #1 + Fixes boo#864785 + Patch kindly provided by Bernhard M. Wiedemann <[email protected]> + 0.5, 2016: - modernize for Python 2 and 3 compatibility diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/withlock-0.5/THANKS new/withlock-0.6/THANKS --- old/withlock-0.5/THANKS 1970-01-01 01:00:00.000000000 +0100 +++ new/withlock-0.6/THANKS 2026-11-26 00:10:43.000000000 +0100 @@ -0,0 +1,23 @@ +Ian Jackson + Author of with-lock-ex.c, the C program whose locking strategy and + usage semantics inspired withlock's design. Placed in the public + domain by him. + +Martin Caj and Martin Vidner (SUSE) + Noticed that the got_lock variable was not declared global, which + left the lock file behind after otherwise successful runs (0.4). + +Jan Beran (Red Hat) + Modernised the script for Python 2 and Python 3 compatibility + (release 0.5). + +Bernhard M. Wiedemann (SUSE) + Found the test case that exposed the lock file cleanup bug, where a + file was removed even when no lock had been obtained, and provided + the fix (boo#864785). Also contributed the patch that re-opens the + lock file before every locking attempt, which is part of the sources + since 0.6. + +rool.dev + Helped me with the footwork of releasing 0.6. + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/withlock-0.5/withlock new/withlock-0.6/withlock --- old/withlock-0.5/withlock 2016-03-02 11:28:46.000000000 +0100 +++ new/withlock-0.6/withlock 2026-11-26 00:10:43.000000000 +0100 @@ -1,6 +1,6 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 -# Copyright 2009-2016 Peter Poeml +# Copyright 2009-2026 Peter Poeml # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -39,7 +39,7 @@ from __future__ import absolute_import from __future__ import print_function -__version__ = '0.5' +__version__ = '0.6' import os import os.path @@ -137,12 +137,11 @@ prev_umask = os.umask(0o066) - lock = open(lockfile, 'w') - global got_lock while 1 + 1 == 2: try: + lock = open(lockfile, 'w') fcntl.lockf(lock, fcntl.LOCK_EX | fcntl.LOCK_NB) got_lock = True break diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/withlock-0.5/withlock.1 new/withlock-0.6/withlock.1 --- old/withlock-0.5/withlock.1 2016-03-02 11:28:46.000000000 +0100 +++ new/withlock-0.6/withlock.1 2026-11-26 00:10:43.000000000 +0100 @@ -1,134 +1,88 @@ -.\" generated with Ronn/v0.7.3 -.\" http://github.com/rtomayko/ronn/tree/0.7.3 -. -.TH "WITHLOCK" "1" "June 2015" "" "" -. +.\" generated with Ronn-NG/v0.9.1 +.\" http://github.com/apjanke/ronn-ng/tree/0.9.1 +.TH "WITHLOCK" "1" "November 2026" "" .SH "NAME" \fBwithlock\fR \- locking wrapper script -. .SH "SYNOPSIS" -\fBwithlock\fR \fIlockfile\fR \fIcommand\fR [\fIargs\fR\.\.\.] -. +\fBwithlock\fR \fIlockfile\fR \fIcommand\fR [\fIargs\fR\|\.\|\.\|\.] .br -\fBwithlock\fR [\fB\-w <seconds>\fR|\fB\-\-wait\fR=\fIseconds\fR] [\fB\-q\fR|\fB\-\-quiet\fR] [\fB\-v\fR|\fB\-\-verbose\fR] \fIlockfile\fR \fIcommand\fR [\fIargs\fR\.\.\.] -. +\fBwithlock\fR [\fB\-w <seconds>\fR|\fB\-\-wait\fR=\fIseconds\fR] [\fB\-q\fR|\fB\-\-quiet\fR] [\fB\-v\fR|\fB\-\-verbose\fR] \fIlockfile\fR \fIcommand\fR [\fIargs\fR\|\.\|\.\|\.] .br \fBwithlock\fR [\fB\-h\fR|\fB\-\-help\fR] -. .br \fBwithlock\fR [\fB\-\-version\fR] -. .SH "DESCRIPTION" withlock(1) is a wrapper script to make sure that some program isn\'t run more than once\. It is ideal to prevent periodic jobs spawned by cron(8) from stacking up\. -. .P It uses locks that are valid only while the wrapper is running, and thus will \fInever\fR require additional cleanup, even after a system crash or reboot\. This makes the wrapper safe and easy to use, and better than implementing half\-hearted locking within scripts\. -. .P The script can wait a defined time for a lock to become "free"\. -. .SH "SECURITY" Lockfiles, generally, MUST NOT be placed in a publicly writable directory, because that would allow for a symlink attack\. For that reason, withlock(1) simply disallows lockfiles in such locations\. -. .SH "OPTIONS" -. .TP \fB\-v\fR, \fB\-\-verbose\fR Print debug messages to stderr\. -. .TP \fB\-q\fR, \fB\-\-quiet\fR If lock can\'t be acquired immediately, silently quit without error\. -. .TP \fB\-\-version\fR Show program\'s version number and exit\. -. .TP \fB\-h\fR, \fB\-\-help\fR Show command synopsis and exit\. -. .TP \fB\-w\fR \fIseconds\fR, \fB\-\-wait\fR=\fIseconds\fR Wait for maximum \fIseconds\fR for the lock to be acquired\. -. .SH "EXAMPLES" Instead of your command -. .IP "" 4 -. .nf - -<command> [<args>\.\.\.] -. +<command> [<args>\|\.\|\.\|\.] .fi -. .IP "" 0 -. .P you simply use -. .IP "" 4 -. .nf - -withlock <lockfile> <command> [<args>\.\.\.] -. +withlock <lockfile> <command> [<args>\|\.\|\.\|\.] .fi -. .IP "" 0 -. .P cron(8) jobs, especially long running ones, are frequently run under withlock(1)\. Here\'s an example: -. .IP "" 4 -. .nf - \-*/10 * * * * root withlock LOCK\-serverstatus /usr/bin/log_server_status2 43 5,17 * * * mirror withlock LOCK\-rsync\-edu\-isos rsync \-rlptoH \-\-no\-motd rsync\.opensuse\-education\.org::download/ISOs/ /srv/mirrors/opensuse\-education/ISOs \-hi -. .fi -. .IP "" 0 -. .SH "HISTORY" This wrapper was implemented because no comparable solution was found even after looking around for a long time (and suffering problems caused by missing or insufficient locking for years)\. The only solution that comes close is with\-lock\-ex\.c, an implementation in C, which was written by Ian Jackson and placed in the public domain by him\. with\-lock\-ex\.c is traditionally available on Debian in a package named chiark\-utils\-bin\. Parts of withlock\'s locking strategy and parts of the usage semantics were inspired from that program\. This implementation was chosen to be done in Python because it\'s universally available, easy to adapt, and doesn\'t require to be compiled\. -. .P Then, somebody pointed out to me that there\'s flock(1), a small tool written in C that does the same\. Indeed, I had apparently managed to miss that tool during a decade\'s worth of Linux hacking (you discover something new every day, don\'t you?)\. The functionality is mainly the same indeed\. -. .P However, withlock(1) has some advantages: -. -.IP "\(bu" 4 +.IP "\[ci]" 4 withlock(1) ist a little easier and logical to use than flock(1)\. The semantics are more suited for sysadmins\. -. -.IP "\(bu" 4 +.IP "\[ci]" 4 withlock(1) always cleans up it\'s lock files\. flock(1) always lets them lying around\. I admit that I like the fact that with withlock(1) I can always see by the presence of the lock files which jobs are running\. -. -.IP "\(bu" 4 +.IP "\[ci]" 4 flock(1) doesn\'t prevent using unsafe directories -. -.IP "\(bu" 4 +.IP "\[ci]" 4 withlock(1) is easily extensible -. -.IP "\(bu" 4 +.IP "\[ci]" 4 it could be used as a Python module (not implemented so far) -. -.IP "\(bu" 4 +.IP "\[ci]" 4 flock(1) doesn\'t exist on Solaris and OSX -. .IP "" 0 -. .SH "BUGS" withlock(1) has been tested on many platforms, including Debian, Ubuntu, openSUSE, CentOS, Fedora, FreeBSD, OSX, OpenCSW Solaris and is in production use since 2009\. There don\'t seem to be race conditions (the author tried very hard to break it) but there are no guarantees\. -. +.P +Sub\-second race: the lock file is unlinked at exit, so a withlock starting in that instant can create and lock a fresh file and overlap the finishing job\. Negligible for jobs spawned minutes apart; only several jobs per second hit it reliably\. Obvious fix: don\'t unlink the lock file at exit\. TODO: add this as an option\. .SH "AUTHOR" This program was written by Peter Pöml \fIpeter@poeml\.de\fR in 2009\. -. .SH "SEE ALSO" flock(1) -. .br with\-lock\-ex(1) from Debian package chiark\-utils\-bin diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/withlock-0.5/withlock.1.html new/withlock-0.6/withlock.1.html --- old/withlock-0.5/withlock.1.html 2016-03-02 11:28:46.000000000 +0100 +++ new/withlock-0.6/withlock.1.html 2026-11-26 00:10:43.000000000 +0100 @@ -1,8 +1,8 @@ <!DOCTYPE html> <html> <head> - <meta http-equiv='content-type' value='text/html;charset=utf8'> - <meta name='generator' value='Ronn/v0.7.3 (http://github.com/rtomayko/ronn/tree/0.7.3)'> + <meta http-equiv='content-type' content='text/html;charset=utf8'> + <meta name='generator' content='Ronn-NG/v0.9.1 (http://github.com/apjanke/ronn-ng/tree/0.9.1)'> <title>withlock(1) - locking wrapper script</title> <style type='text/css' media='all'> /* style: man */ @@ -71,16 +71,17 @@ <li class='tr'>withlock(1)</li> </ol> - <h2 id="NAME">NAME</h2> + + +<h2 id="NAME">NAME</h2> <p class="man-name"> <code>withlock</code> - <span class="man-whatis">locking wrapper script</span> </p> - <h2 id="SYNOPSIS">SYNOPSIS</h2> -<p><code>withlock</code> <var>lockfile</var> <var>command</var> [<var>args</var>...]<br /> -<code>withlock</code> [<code>-w <seconds></code>|<code>--wait</code>=<var>seconds</var>] [<code>-q</code>|<code>--quiet</code>] [<code>-v</code>|<code>--verbose</code>] <var>lockfile</var> <var>command</var> [<var>args</var>...]<br /> -<code>withlock</code> [<code>-h</code>|<code>--help</code>]<br /> +<p><code>withlock</code> <var>lockfile</var> <var>command</var> [<var>args</var>...]<br> +<code>withlock</code> [<code>-w <seconds></code>|<code>--wait</code>=<var>seconds</var>] [<code>-q</code>|<code>--quiet</code>] [<code>-v</code>|<code>--verbose</code>] <var>lockfile</var> <var>command</var> [<var>args</var>...]<br> +<code>withlock</code> [<code>-h</code>|<code>--help</code>]<br> <code>withlock</code> [<code>--version</code>]</p> <h2 id="DESCRIPTION">DESCRIPTION</h2> @@ -105,24 +106,36 @@ <h2 id="OPTIONS">OPTIONS</h2> <dl> -<dt><code>-v</code>, <code>--verbose</code></dt><dd><p>Print debug messages to stderr.</p></dd> -<dt><code>-q</code>, <code>--quiet</code></dt><dd><p>If lock can't be acquired immediately, silently quit without error.</p></dd> -<dt><code>--version</code></dt><dd><p>Show program's version number and exit.</p></dd> -<dt><code>-h</code>, <code>--help</code></dt><dd><p>Show command synopsis and exit.</p></dd> -<dt><code>-w</code> <var>seconds</var>, <code>--wait</code>=<var>seconds</var></dt><dd><p>Wait for maximum <var>seconds</var> for the lock to be acquired.</p></dd> +<dt> +<code>-v</code>, <code>--verbose</code> +</dt> +<dd>Print debug messages to stderr.</dd> +<dt> +<code>-q</code>, <code>--quiet</code> +</dt> +<dd>If lock can't be acquired immediately, silently quit without error.</dd> +<dt><code>--version</code></dt> +<dd>Show program's version number and exit.</dd> +<dt> +<code>-h</code>, <code>--help</code> +</dt> +<dd>Show command synopsis and exit.</dd> +<dt> +<code>-w</code> <var>seconds</var>, <code>--wait</code>=<var>seconds</var> +</dt> +<dd>Wait for maximum <var>seconds</var> for the lock to be acquired.</dd> </dl> - <h2 id="EXAMPLES">EXAMPLES</h2> <p>Instead of your command</p> -<pre><code><command> [<args>...] +<pre><code><command> [<args>...] </code></pre> <p>you simply use</p> -<pre><code>withlock <lockfile> <command> [<args>...] +<pre><code>withlock <lockfile> <command> [<args>...] </code></pre> <p><span class="man-ref">cron<span class="s">(8)</span></span> jobs, especially long running ones, are frequently run under <a class="man-ref" href="withlock.1.html">withlock<span class="s">(1)</span></a>. @@ -152,18 +165,22 @@ <p>However, <a class="man-ref" href="withlock.1.html">withlock<span class="s">(1)</span></a> has some advantages:</p> <ul> -<li><a class="man-ref" href="withlock.1.html">withlock<span class="s">(1)</span></a> ist a little easier and logical to use than <span class="man-ref">flock<span class="s">(1)</span></span>. The + <li> +<a class="man-ref" href="withlock.1.html">withlock<span class="s">(1)</span></a> ist a little easier and logical to use than <span class="man-ref">flock<span class="s">(1)</span></span>. The semantics are more suited for sysadmins.</li> -<li><a class="man-ref" href="withlock.1.html">withlock<span class="s">(1)</span></a> always cleans up it's lock files. <span class="man-ref">flock<span class="s">(1)</span></span> always lets them lying + <li> +<a class="man-ref" href="withlock.1.html">withlock<span class="s">(1)</span></a> always cleans up it's lock files. <span class="man-ref">flock<span class="s">(1)</span></span> always lets them lying around. I admit that I like the fact that with <a class="man-ref" href="withlock.1.html">withlock<span class="s">(1)</span></a> I can always see by the presence of the lock files which jobs are running.</li> -<li><span class="man-ref">flock<span class="s">(1)</span></span> doesn't prevent using unsafe directories</li> -<li><a class="man-ref" href="withlock.1.html">withlock<span class="s">(1)</span></a> is easily extensible</li> -<li>it could be used as a Python module (not implemented so far)</li> -<li><span class="man-ref">flock<span class="s">(1)</span></span> doesn't exist on Solaris and OSX</li> + <li> +<span class="man-ref">flock<span class="s">(1)</span></span> doesn't prevent using unsafe directories</li> + <li> +<a class="man-ref" href="withlock.1.html">withlock<span class="s">(1)</span></a> is easily extensible</li> + <li>it could be used as a Python module (not implemented so far)</li> + <li> +<span class="man-ref">flock<span class="s">(1)</span></span> doesn't exist on Solaris and OSX</li> </ul> - <h2 id="BUGS">BUGS</h2> <p><a class="man-ref" href="withlock.1.html">withlock<span class="s">(1)</span></a> has been tested on many platforms, including Debian, Ubuntu, @@ -171,19 +188,24 @@ use since 2009. There don't seem to be race conditions (the author tried very hard to break it) but there are no guarantees.</p> +<p>Sub-second race: the lock file is unlinked at exit, so a withlock starting in +that instant can create and lock a fresh file and overlap the finishing job. +Negligible for jobs spawned minutes apart; only several jobs per second hit it +reliably. Obvious fix: don't unlink the lock file at exit. TODO: add this as an +option.</p> + <h2 id="AUTHOR">AUTHOR</h2> -<p>This program was written by Peter Pöml <a href="mailto:peter@poeml.de" data-bare-link="true">peter@poeml.de</a> in 2009.</p> +<p>This program was written by Peter Pöml <a href="mailto:[email protected]" data-bare-link="true">[email protected]</a> in 2009.</p> <h2 id="SEE-ALSO">SEE ALSO</h2> -<p><span class="man-ref">flock<span class="s">(1)</span></span><br /> +<p><span class="man-ref">flock<span class="s">(1)</span></span><br> <span class="man-ref">with-lock-ex<span class="s">(1)</span></span> from Debian package chiark-utils-bin</p> - <ol class='man-decor man-foot man foot'> <li class='tl'></li> - <li class='tc'>June 2015</li> + <li class='tc'>November 2026</li> <li class='tr'>withlock(1)</li> </ol> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/withlock-0.5/withlock.1.ronn new/withlock-0.6/withlock.1.ronn --- old/withlock-0.5/withlock.1.ronn 2016-03-02 11:28:46.000000000 +0100 +++ new/withlock-0.6/withlock.1.ronn 2026-11-26 00:10:43.000000000 +0100 @@ -105,7 +105,11 @@ use since 2009. There don't seem to be race conditions (the author tried very hard to break it) but there are no guarantees. - +Sub-second race: the lock file is unlinked at exit, so a withlock starting in +that instant can create and lock a fresh file and overlap the finishing job. +Negligible for jobs spawned minutes apart; only several jobs per second hit it +reliably. Obvious fix: don't unlink the lock file at exit. TODO: add this as an +option. ## AUTHOR
