diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2002-11-24 16:08:06 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2002-11-24 16:08:06 +0100 |
commit | b4d1358c50fb095eb7a2daf494780ce193ffb453 (patch) | |
tree | 579ab101c24f2ee53e14f9ce3ce5f09efdf6152b /tools.c | |
parent | 9ee568e1991f1c2eaae885593db5c2f1d2c8f754 (diff) | |
download | vdr-b4d1358c50fb095eb7a2daf494780ce193ffb453.tar.gz vdr-b4d1358c50fb095eb7a2daf494780ce193ffb453.tar.bz2 |
Improved deleting stale lock files1.1.17
Diffstat (limited to 'tools.c')
-rw-r--r-- | tools.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: tools.c 1.74 2002/11/24 15:47:02 kls Exp $ + * $Id: tools.c 1.75 2002/11/24 16:04:57 kls Exp $ */ #include "tools.h" @@ -722,7 +722,7 @@ bool cLockFile::Lock(int WaitSeconds) if (errno == EEXIST) { struct stat fs; if (stat(fileName, &fs) == 0) { - if (time(NULL) - fs.st_mtime > LOCKFILESTALETIME) { + if (abs(time(NULL)) - fs.st_mtime > LOCKFILESTALETIME) { esyslog("ERROR: removing stale lock file '%s'", fileName); if (remove(fileName) < 0) { LOG_ERROR_STR(fileName); |