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

Diff for /src/usr.bin/sort/sort.c between version 1.12 and 1.13

version 1.12, 1999/05/24 17:57:19 version 1.13, 1999/11/30 16:41:41
Line 60 
Line 60 
 #include "fsort.h"  #include "fsort.h"
 #include "pathnames.h"  #include "pathnames.h"
   
   #include <sys/types.h>
   #include <sys/stat.h>
 #include <paths.h>  #include <paths.h>
 #include <signal.h>  #include <signal.h>
 #include <stdlib.h>  #include <stdlib.h>
Line 264 
Line 266 
                 int sigtable[] = {SIGHUP, SIGINT, SIGPIPE, SIGXCPU, SIGXFSZ,                  int sigtable[] = {SIGHUP, SIGINT, SIGPIPE, SIGXCPU, SIGXFSZ,
                     SIGVTALRM, SIGPROF, 0};                      SIGVTALRM, SIGPROF, 0};
                 int outfd;                  int outfd;
                   mode_t um;
   
                 errno = 0;                  errno = 0;
   
Line 272 
Line 275 
                 act.sa_handler = onsig;                  act.sa_handler = onsig;
                 (void)snprintf(toutpath, sizeof(toutpath), "%sXXXXXXXXXX",                  (void)snprintf(toutpath, sizeof(toutpath), "%sXXXXXXXXXX",
                     outpath);                      outpath);
                 if ((outfd = mkstemp(toutpath)) < 0 ||                  /* use default umask to try and avoid one syscall */
                   um = umask(S_IWGRP|S_IWOTH);
                   if (um != S_IWGRP|S_IWOTH)
                           (void)umask(um);
                   if ((outfd = mkstemp(toutpath)) == -1 ||
                       fchmod(outfd, DEFFILEMODE & ~um) == -1 ||
                     (outfp = fdopen(outfd, "w")) == 0)                      (outfp = fdopen(outfd, "w")) == 0)
                         err(2, toutpath);                          err(2, toutpath);
                 outfile = toutpath;                  outfile = toutpath;

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13