Diff for /embedtools/src/cfexec.c between versions 1.3 and 1.4

version 1.3, 2012/07/22 22:46:47 version 1.4, 2013/01/18 12:58:13
Line 111  static int Line 111  static int
 mkevent(struct kevent *chg, struct kevent *evt)  mkevent(struct kevent *chg, struct kevent *evt)
 {  {
         int f;          int f;
        char szStr[MAX_STR];        char szStr[STRSIZ];
   
         f = open(szSess, O_CREAT | O_WRONLY | O_TRUNC, 0644);          f = open(szSess, O_CREAT | O_WRONLY | O_TRUNC, 0644);
         if (f == -1) {          if (f == -1) {
                 printf("Error:: can`t lock session #%d - %s\n", errno, strerror(errno));                  printf("Error:: can`t lock session #%d - %s\n", errno, strerror(errno));
                 return -1;                  return -1;
         } else {          } else {
                memset(szStr, 0, MAX_STR);                memset(szStr, 0, sizeof szStr);
                snprintf(szStr, MAX_STR, "%d", getpid());                snprintf(szStr, sizeof szStr, "%d", getpid());
                 write(f, szStr, strlen(szStr));                  write(f, szStr, strlen(szStr));
         }          }
         VERB(3) printf("Created lock file %s\n", szSess);          VERB(3) printf("Created lock file %s\n", szSess);

Removed from v.1.3  
changed lines
  Added in v.1.4


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>