aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/dotlock.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/common/dotlock.c b/common/dotlock.c
index 06e3910ad..84d0b509c 100644
--- a/common/dotlock.c
+++ b/common/dotlock.c
@@ -1200,8 +1200,11 @@ dotlock_destroy (dotlock_t h)
UNLOCK_all_lockfiles ();
/* Then destroy the lock. */
- if (!h->disable)
+ if (!h->disable
+ && (!h->by_parent || h->no_write))
{
+ /* NOTE: under the condition of (by_parent && !no_write),
+ it doesn't come here. So, the lock file remains. */
#ifdef HAVE_DOSISH_SYSTEM
dotlock_destroy_w32 (h);
#else /* !HAVE_DOSISH_SYSTEM */