From: Michael Haggerty Date: Mon, 14 Apr 2014 13:54:44 GMT Subject: [PATCH v3 14/25] remove_lock_file(): call rollback_lock_file() Message-ID: <1397483695-10888-15-git-send-email-mhagger@alum.mit.edu> In-Reply-To: <1397483695-10888-1-git-send-email-mhagger@alum.mit.edu> It does just what we need. Signed-off-by: Michael Haggerty --- lockfile.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lockfile.c b/lockfile.c index ba791d5..477bf4b 100644 --- a/lockfile.c +++ b/lockfile.c @@ -63,12 +63,8 @@ static void remove_lock_file(void) pid_t me = getpid(); while (lock_file_list) { - if (lock_file_list->owner == me && - lock_file_list->filename[0]) { - if (lock_file_list->fd >= 0) - close(lock_file_list->fd); - unlink_or_warn(lock_file_list->filename); - } + if (lock_file_list->owner == me) + rollback_lock_file(lock_file_list); lock_file_list = lock_file_list->next; } } -- 1.9.1