Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1107914

Bug#983405: concurrency

From Marc Haber <mh+debian-packages@zugschlus.de>
Newsgroups linux.debian.bugs.dist
Subject Bug#983405: concurrency
Date 2022-06-27 22:10 +0200
Message-ID <ED3dv-7DIX-3@gated-at.bofh.it> (permalink)
References <BLJFv-3Ly-3@gated-at.bofh.it> <ECYQx-7AZH-1@gated-at.bofh.it> <BLJFv-3Ly-3@gated-at.bofh.it> <ECYQx-7AZH-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Jun 27, 2022 at 11:20:45AM -0400, Matt Barry wrote:
> The simplest way I can think of to solve this is:
> 
> (start)
> 	mkdir /tmp/adduser.lock
> 	sleep and loop until mkdir succeeds
> 
> (end)
> 	remove /tmp/adduser.lock
> 
> which should be atomic assuming a local /tmp.
> 
> One could possibly add a /tmp/adduser.lock/adduser.pid and check for a
> dead lock.. I hesitate to overcomplicate this one (and certainly don't
> want a dependency for it).

/run/adduser please, and probably a simple flock()? lock files in a
shell script are a minefield for code running as root, I hope it is
easier in perl.

Greetings
Marc

-- 
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany    |  lose things."    Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature |  How to make an American Quilt | Fax: *49 6224 1600421

Back to linux.debian.bugs.dist | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Bug#983405: concurrency Matt Barry <matt@hazelmollusk.org> - 2022-06-27 17:30 +0200
  Bug#983405: concurrency Marc Haber <mh+debian-packages@zugschlus.de> - 2022-06-27 22:10 +0200
    Bug#983405: concurrency Matt Barry <matt@hazelmollusk.org> - 2022-06-28 19:40 +0200
      Bug#983405: concurrency Marc Haber <mh+debian-packages@zugschlus.de> - 2022-06-29 11:20 +0200
        Bug#983405: concurrency Matt Barry <matt@hazelmollusk.org> - 2022-06-29 13:40 +0200
          Bug#983405: concurrency Marc Haber <mh+debian-packages@zugschlus.de> - 2022-06-29 15:00 +0200

csiph-web