/[pengfork]/pengfork/src/modem/devlock.c
ViewVC logotype

Diff of /pengfork/src/modem/devlock.c

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

revision 1.2 by chupa, Thu Sep 5 23:09:37 2002 UTC revision 1.3 by chupa, Sun Dec 1 01:19:07 2002 UTC
# Line 21  Line 21 
21   *                   *                
22   */   */
23    
24    #include "config.h"
25    
26  #include <sys/types.h>  #include <sys/types.h>
27  #include <sys/stat.h>  #include <sys/stat.h>
28  #include <stdlib.h>  #include <stdlib.h>
# Line 31  Line 33 
33  #include <signal.h>  #include <signal.h>
34    
35  #include "modem/devlock.h"  #include "modem/devlock.h"
36    #include "log.h"
37    #include "gettext.h"
38    
39  /* note: this function uses the O_EXCL flag to open(), and thus assumes  /* note: this function uses the O_EXCL flag to open(), and thus assumes
40     that /var/lock is not an NFS-mounted drive (according to the open() man     that /var/lock is not an NFS-mounted drive (according to the open() man
# Line 79  device_lock (devicename) Line 83  device_lock (devicename)
83          {          {
84            /* we can create a lockfile now */            /* we can create a lockfile now */
85            close (fd);            close (fd);
86            printf ("Removing stale lock file %s.\n", filename);            log (LOG_WARNING, gettext ("Removing stale lock file %s.\n"), filename);
87            if (unlink (filename))            if (unlink (filename))
88              {              {
89                perror (filename);                perror (filename);

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26