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

Diff for /src/usr.bin/rdistd/Attic/message.c between version 1.2 and 1.3

version 1.2, 1996/03/05 03:16:18 version 1.3, 1996/06/25 22:43:25
Line 454 
Line 454 
         if (!msgfac->mf_fptr) {          if (!msgfac->mf_fptr) {
                 register char *cp;                  register char *cp;
                 char *getenv();                  char *getenv();
                   int fd;
   
                 /*                  /*
                  * Create and open a new temporary file                   * Create and open a new temporary file
Line 465 
Line 466 
                 (void) sprintf(tempfile, "%s/%s", cp, _RDIST_TMP);                  (void) sprintf(tempfile, "%s/%s", cp, _RDIST_TMP);
   
                 msgfac->mf_filename = tempfile;                  msgfac->mf_filename = tempfile;
                 (void) mktemp(msgfac->mf_filename);                  if ((fd = mkstemp(msgfac->mf_filename)) == -1 ||
                 if ((msgfac->mf_fptr = fopen(msgfac->mf_filename, "w"))==NULL)                      (msgfac->mf_fptr = fdopen(fd, "w")) == NULL) {
                           if (fd != -1)
                                   close(fd);
                         fatalerr("Cannot open notify file for writing: %s: %s.",                          fatalerr("Cannot open notify file for writing: %s: %s.",
                               msgfac->mf_filename, SYSERR);                                msgfac->mf_filename, SYSERR);
                   }
                 debugmsg(DM_MISC, "Created notify temp file '%s'",                  debugmsg(DM_MISC, "Created notify temp file '%s'",
                          msgfac->mf_filename);                           msgfac->mf_filename);
         }          }

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