/[imapfilter]/imapfilter/lock.c
ViewVC logotype

Diff of /imapfilter/lock.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by lefcha, Fri Jul 26 22:36:19 2002 UTC revision 1.5.2.1 by lefcha, Mon Jul 29 00:57:03 2002 UTC
# Line 87  int lockfile_remove(void) Line 87  int lockfile_remove(void)
87      if (!lockfile)      if (!lockfile)
88          return 0;          return 0;
89    
90      if (unlink(lockfile)) {      if (unlink(lockfile) && errno != ENOENT) {
91          error("imapfilter: removing lockfile; %s\n", strerror(errno));          error("imapfilter: removing lockfile; %s\n", strerror(errno));
92          return ERROR_FILE_OPEN;          return ERROR_FILE_OPEN;
93      }      }
# Line 110  void kill_imapfilter(void) Line 110  void kill_imapfilter(void)
110          if (kill(n, SIGTERM))          if (kill(n, SIGTERM))
111              fprintf(stderr, "imapfilter: killing process with pid %d; %s\n",              fprintf(stderr, "imapfilter: killing process with pid %d; %s\n",
112                      n, strerror(errno));                      n, strerror(errno));
113            lockfile_remove();
114          exit(0);          exit(0);
115      } else {      } else {
116          fprintf(stderr, "imapfilter: no other imapfilter is running\n");          fprintf(stderr, "imapfilter: no other imapfilter is running\n");

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.5.2.1

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26