Browse Source

Enable lock-related debugging

Alois Mahdal 5 years ago
parent
commit
7b0ad1ca2b
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      src/imapdomo.skel

+ 6
- 0
src/imapdomo.skel View File

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