[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.16 and 1.17

version 1.16, 2001/02/04 21:27:01 version 1.17, 2001/11/17 19:51:34
Line 265 
Line 265 
                 outfile = outpath = toutpath;                  outfile = outpath = toutpath;
         } else if (!(ch = access(outpath, 0)) &&          } else if (!(ch = access(outpath, 0)) &&
             strncmp(_PATH_DEV, outpath, 5)) {              strncmp(_PATH_DEV, outpath, 5)) {
                 struct sigaction act = {0, SIG_BLOCK, 6};                  struct sigaction act;
                 int sigtable[] = {SIGHUP, SIGINT, SIGPIPE, SIGXCPU, SIGXFSZ,                  int sigtable[] = {SIGHUP, SIGINT, SIGPIPE, SIGXCPU, SIGXFSZ,
                     SIGVTALRM, SIGPROF, 0};                      SIGVTALRM, SIGPROF, 0};
                 int outfd;                  int outfd;
Line 275 
Line 275 
   
                 if (access(outpath, W_OK))                  if (access(outpath, W_OK))
                         err(2, "%s", outpath);                          err(2, "%s", outpath);
                 act.sa_handler = onsig;  
                 (void)snprintf(toutpath, sizeof(toutpath), "%sXXXXXXXXXX",                  (void)snprintf(toutpath, sizeof(toutpath), "%sXXXXXXXXXX",
                     outpath);                      outpath);
                 /* use default umask to try and avoid one syscall */                  /* use default umask to try and avoid one syscall */
Line 289 
Line 288 
                 outfile = toutpath;                  outfile = toutpath;
   
                 (void)atexit(cleanup);                  (void)atexit(cleanup);
                   sigfillset(&act.sa_mask);
                   act.sa_flags = SA_RESTART;
                   act.sa_handler = onsig;
                 for (i = 0; sigtable[i]; ++i)   /* always unlink toutpath */                  for (i = 0; sigtable[i]; ++i)   /* always unlink toutpath */
                         sigaction(sigtable[i], &act, 0);                          sigaction(sigtable[i], &act, 0);
         } else          } else

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17