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

Diff of /imapfilter/lock.c

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

revision 1.10 by lefcha, Sat Feb 22 16:06:41 2003 UTC revision 1.11 by lefcha, Thu Jul 31 15:53:19 2003 UTC
# Line 1  Line 1 
1  #include <stdio.h>  #include <stdio.h>
 #include <stdlib.h>  
 #include <limits.h>  
2  #include <string.h>  #include <string.h>
3    #include <unistd.h>
4  #include <errno.h>  #include <errno.h>
5  #include <sys/types.h>  #include <limits.h>
6  #include <signal.h>  #include <signal.h>
7    #include <sys/types.h>
8    #include <sys/stat.h>
9    #include <fcntl.h>
10    
11    #include "config.h"
12  #include "imapfilter.h"  #include "imapfilter.h"
13    #include "pathnames.h"
14    
15    
16  extern char *home;  extern char *home;
# Line 14  extern char *home; Line 18  extern char *home;
18  static char *lockfile = NULL;   /* Lock file to stop new imapfilter processes. */  static char *lockfile = NULL;   /* Lock file to stop new imapfilter processes. */
19    
20    
21    pid_t lockfile_pid(void);
22    
23    
24  /*  /*
25   * Create lockfile with the PID of imapfilter as its contents.   * Create lockfile with the PID of imapfilter as its contents.
26   */   */
# Line 71  lockfile_pid(void) Line 78  lockfile_pid(void)
78    
79          n = 0;          n = 0;
80    
81          snprintf(lockf, PATH_MAX, "%s/%s", home, ".imapfilter/lock");          snprintf(lockf, PATH_MAX, "%s/%s", home, PATHNAME_LOCK_FILE);
82          lockfile = xstrdup(lockf);          lockfile = xstrdup(lockf);
83    
84          if (exists_file(lockfile)) {          if (exists_file(lockfile)) {

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26