[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] Locking In Scripts and nmh Locking
From: |
norm |
Subject: |
Re: [Nmh-workers] Locking In Scripts and nmh Locking |
Date: |
Sat, 28 Apr 2012 05:33:00 -0700 |
address@hidden writes:
>--==_Exmh_1335562212_1978P
>Content-Type: text/plain; charset=us-ascii
>
>On Fri, 27 Apr 2012 13:48:19 -0700, address@hidden said:
>> command is not executed until no other 'mhlock -all' is running, and
>> until
>> no relevant nmh program is running. While command is running no other
>> mhlock -all runs nor does any relevant nmh program run.
>
>If 'command' is a shell script that ends up inadvertently calling something
>that calls mhlock itself, you just deadlocked. And blindly changing the
>call inside the script to have a --noblock semantic may not be right either,
>as then it would be unsafe to run the script standalone without an mhlock
>wrapper...
You are right!
How about an environment variable, say NMH_LOCK. When NMH_LOCK is set,
mhlock -all would ignore locking. Otherwise mhlock -all would set it before
executing command, but after obtaining the lock, and unset it when command
exits, but before relinquishing the lock.
>Locking is hard
Sure is. But that doesn't mean that it should be ignored.
Norman Shapiro
798 Barron Avenue
Palo Alto CA 94306-3109
(650) 565-8215
address@hidden
Re: [Nmh-workers] Locking In Scripts and nmh Locking, norm, 2012/04/27
- Re: [Nmh-workers] Locking In Scripts and nmh Locking, Ralph Corderoy, 2012/04/27
- Re: [Nmh-workers] Locking In Scripts and nmh Locking, Ken Hornstein, 2012/04/27
- Re: [Nmh-workers] Locking In Scripts and nmh Locking, norm, 2012/04/27
- Re: [Nmh-workers] Locking In Scripts and nmh Locking, Valdis . Kletnieks, 2012/04/27
- Re: [Nmh-workers] Locking In Scripts and nmh Locking,
norm <=
- Re: [Nmh-workers] Locking In Scripts and nmh Locking, norm, 2012/04/28
Re: [Nmh-workers] Locking In Scripts and nmh Locking, Ken Hornstein, 2012/04/27
Re: [Nmh-workers] Locking In Scripts and nmh Locking, norm, 2012/04/28
Re: [Nmh-workers] Locking In Scripts and nmh Locking, Ken Hornstein, 2012/04/29
Re: [Nmh-workers] Locking In Scripts and nmh Locking, Lyndon Nerenberg, 2012/04/29
Re: [Nmh-workers] Locking In Scripts and nmh Locking, David Levine, 2012/04/26
Re: [Nmh-workers] Locking In Scripts and nmh Locking, David Levine, 2012/04/26