jaromail

a commandline tool to easily and privately handle your e-mail
git clone git://parazyd.org/jaromail.git
Log | Files | Refs | Submodules | README

commit cb0b511fa7d86bc8f44b2d22cbac5e4fae1ffb4b
parent 21d8effb2075ea03b6b9e981f0b244b0cd619291
Author: parazyd <parazyd@dyne.org>
Date:   Sun,  8 Oct 2017 18:24:14 +0200

remove unused headers in dotlock.c

Diffstat:
Msrc/dotlock.c | 19+------------------
1 file changed, 1 insertion(+), 18 deletions(-)

diff --git a/src/dotlock.c b/src/dotlock.c @@ -18,23 +18,14 @@ */ #include <stdio.h> -#include <stdlib.h> #include <string.h> - #include <unistd.h> -#include <dirent.h> -#include <sys/file.h> #include <sys/stat.h> #include <sys/utsname.h> #include <errno.h> -#include <time.h> #include <fcntl.h> #include <limits.h> -#ifndef _POSIX_PATH_MAX -#include <limits.h> -#endif - #define MAXLINKS 1024 /* maximum link depth */ #define LONG_STRING 1024 #define MAXLOCKATTEMPT 5 @@ -325,7 +316,6 @@ dotlock_lock (const char *realpath) int fd; int hard_count = 0; struct stat sb; - time_t t; int i; snprintf (nfslockfile, sizeof (nfslockfile), "%s.%s.%d", @@ -358,14 +348,7 @@ dotlock_lock (const char *realpath) if (sb.st_nlink == 2) break; - /* don't trust sleep (3) as it may be interrupted - * by users sending signals. - */ - - t = time (NULL); - do { - sleep (1); - } while (time (NULL) == t); + sleep (1); } unlink (nfslockfile);