summaryrefslogtreecommitdiff
path: root/AuLock.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-03-30 11:42:09 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-03-30 11:42:09 -0700
commitf5a57d8a21a34d7084cce294e24c0422e02ef8ef (patch)
tree924966ccd5bd12267301cf9b2463e3846189e1d4 /AuLock.c
parent4352cf9707df08d51ef891be156d475743d0a060 (diff)
Use remove() instead of unlink() to delete lock files
In normal cases, no difference. If someone has accidentally created a directory with those names, this can save you from needing to fsck to clean it up on some filesystems (like UFS). Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'AuLock.c')
-rw-r--r--AuLock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/AuLock.c b/AuLock.c
index ce15f25..5dfc174 100644
--- a/AuLock.c
+++ b/AuLock.c
@@ -64,8 +64,8 @@ long dead)
* case a 0 deadtime to force lock removal
*/
if (dead == 0 || now - statb.st_ctime > dead) {
- (void) unlink (creat_name);
- (void) unlink (link_name);
+ (void) remove (creat_name);
+ (void) remove (link_name);
}
}