Skip to main content

Timeline for Correct locking in shell scripts?

Current License: CC BY-SA 3.0

27 events
when toggle format what by license comment
S Jan 29, 2023 at 13:38 history bounty ended Flimm
S Jan 29, 2023 at 13:38 history notice removed Flimm
S Jan 25, 2023 at 8:43 history bounty started Flimm
S Jan 25, 2023 at 8:43 history notice added Flimm Reward existing answer
Dec 4, 2018 at 5:30 answer added Wildcard timeline score: 2
Nov 10, 2016 at 0:31 answer added Partly Cloudy timeline score: 12
Jun 23, 2016 at 19:32 comment added maxschlepzig I've created the tool lockf that supports various locking methods (lockf, fcntl, flock, rename, ...). Perhaps useful for testing the different methods in heterogeneous environments.
May 7, 2016 at 21:17 history edited maxschlepzig CC BY-SA 3.0
lockrun now uses lockf() by default, anotate race condition
Sep 14, 2015 at 21:15 comment added Chris Davies @Ulrich very belatedly, storing a PID in an NFS lockfile adds very little value. Even adding the hostname still doesn't really help with checking for a live process
Jun 13, 2015 at 10:03 answer added ziggestardust timeline score: 0
Apr 24, 2014 at 20:37 answer added tiian timeline score: 0
Apr 7, 2014 at 22:04 answer added jofel timeline score: 11
Dec 9, 2013 at 22:08 answer added user54178 timeline score: -4
Sep 19, 2013 at 16:26 answer added Newton T Hammet Jr timeline score: -5
May 31, 2012 at 19:16 answer added AndresVia timeline score: 3
Oct 7, 2011 at 9:43 vote accept maxschlepzig
Oct 5, 2011 at 5:52 answer added frogstarr78 timeline score: 1
Oct 5, 2011 at 1:57 answer added Arcege timeline score: 18
Oct 5, 2011 at 1:16 answer added dru8274 timeline score: 6
Oct 4, 2011 at 22:07 history tweeted twitter.com/#!/StackUnix/status/121345713031483392
Oct 4, 2011 at 21:07 comment added maxschlepzig related question on SO: stackoverflow.com/questions/185451/…
Oct 4, 2011 at 21:02 comment added maxschlepzig @Shawn, not really, does not mention crond and NFS.
Oct 4, 2011 at 20:57 comment added Shawn J. Goff possible duplicate of What Unix commands can be used as a semaphore/lock?
Oct 4, 2011 at 19:50 answer added Tim Kennedy timeline score: 56
Oct 4, 2011 at 19:37 answer added glenn jackman timeline score: 14
Oct 4, 2011 at 19:13 comment added Ulrich Schwarz Tangentially, and for the benefit of others who may consider your initial pattern Good Enough(tm), that shell code should possibly trap TERM in order to remove its lockfile when killed; and it seems to be good practice to store one's own pid in the lockfile, rather than just touching it.
Oct 4, 2011 at 18:59 history asked maxschlepzig CC BY-SA 3.0