sm-sorcery AT lists.ibiblio.org
Subject: Discussion of Sorcery related topics
List archive
- From: Tony Smith <tony AT smee.org>
- To: Mark Andrews <msasgl AT msa-enterprises.com>, sm-sorcery AT lists.ibiblio.org
- Subject: Re: [SM-Sorcery]libbdb (was libvariable)
- Date: Tue, 8 Oct 2002 17:45:18 +0100
On Tuesday 08 October 2002 5:25 pm, Mark Andrews wrote:
> Hello All,
>
> MA> ToDo: Improve lock system, allow for resolving deadlocks.
>
> Added crude deadlock resolution. Replace "sleep 0" in getlock
> with this code:
>
> if ! ps -p $(cat $1.LOCK); then
> rm -f $1.LOCK
> fi
Another trick you might consider is using "kill -0 $(cat $1.LOCK)". It fails
if the process doesn't exist but doesn't harm the process in any way if it
does. It's much more efficient than using "ps" 'coz it doesn't scan the
process table.
Tony.
-
[SM-Sorcery]libbdb (was libvariable),
Mark Andrews, 10/08/2002
-
Re: [SM-Sorcery]libbdb (was libvariable),
Mark Andrews, 10/08/2002
-
Re: [SM-Sorcery]libbdb (was libvariable),
Tony Smith, 10/08/2002
- Re[2]: [SM-Sorcery]libbdb (was libvariable), Mark Andrews, 10/09/2002
-
Re: [SM-Sorcery]libbdb (was libvariable),
Tony Smith, 10/08/2002
- Re: [SM-Sorcery]libbdb (was libvariable), Dufflebunk, 10/08/2002
-
Re: [SM-Sorcery]libbdb (was libvariable),
Mark Andrews, 10/08/2002
Archive powered by MHonArc 2.6.24.