Bläddra i källkod

Enable lock-related debugging

Alois Mahdal 5 år sedan
förälder
incheckning
7b0ad1ca2b
1 ändrade filer med 6 tillägg och 0 borttagningar
  1. 6
    0
      src/imapdomo.skel

+ 6
- 0
src/imapdomo.skel Visa fil

@@ -84,8 +84,10 @@ lock() {
84 84
     #
85 85
     # Put the lockfile
86 86
     #
87
+    debug -v NoLock
87 88
     $NoLock && return 0
88 89
     date +"$$@%s" > "$IMAPDOMO_USER_CACHE/lock"
90
+    debug -f "$IMAPDOMO_USER_CACHE/lock"
89 91
 }
90 92
 
91 93
 is_locked() {
@@ -95,7 +97,9 @@ is_locked() {
95 97
     # True if lockfile exists. False if lockfile does not exist or locking
96 98
     # is turned off.
97 99
     #
100
+    debug -v NoLock
98 101
     $NoLock && return 1
102
+    debug -f "$IMAPDOMO_USER_CACHE/lock"
99 103
     test -e "$IMAPDOMO_USER_CACHE/lock"
100 104
 }
101 105
 
@@ -103,7 +107,9 @@ unlock() {
103 107
     #
104 108
     # Remove the lockfile
105 109
     #
110
+    debug -v NoLock
106 111
     $NoLock && return 0
112
+    debug -f "$IMAPDOMO_USER_CACHE/lock"
107 113
     rm "$IMAPDOMO_USER_CACHE/lock"
108 114
 }
109 115