[BACK]Return to uucplock.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tip

Diff for /src/usr.bin/tip/Attic/uucplock.c between version 1.10 and 1.11

version 1.10, 2003/06/03 02:56:18 version 1.11, 2006/03/16 19:32:46
Line 48 
Line 48 
 #include <errno.h>  #include <errno.h>
 #include "pathnames.h"  #include "pathnames.h"
   
 /*  /*
  * uucp style locking routines   * uucp style locking routines
  * return: 0 - success   * return: 0 - success
  *        -1 - failure   *        -1 - failure
  */   */
   
 int  int
 uu_lock(ttyname)  uu_lock(char *ttyname)
         char *ttyname;  
 {  {
         int fd, len;          int fd, len;
         char tbuf[sizeof(_PATH_LOCKDIRNAME) + MAXNAMLEN];          char tbuf[sizeof(_PATH_LOCKDIRNAME) + MAXNAMLEN];
Line 77 
Line 76 
                         return(-1);                          return(-1);
                 }                  }
                 len = read(fd, text_pid, sizeof(text_pid)-1);                  len = read(fd, text_pid, sizeof(text_pid)-1);
                 if(len<=0) {                  if (len<=0) {
                         perror(tbuf);                          perror(tbuf);
                         (void)close(fd);                          (void)close(fd);
                         fprintf(stderr, "Can't read lock file.\n");                          fprintf(stderr, "Can't read lock file.\n");
Line 118 
Line 117 
 }  }
   
 int  int
 uu_unlock(ttyname)  uu_unlock(char *ttyname)
         char *ttyname;  
 {  {
         char tbuf[sizeof(_PATH_LOCKDIRNAME) + MAXNAMLEN];          char tbuf[sizeof(_PATH_LOCKDIRNAME) + MAXNAMLEN];
   

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