[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.37 and 1.38

version 1.37, 2009/10/27 23:59:43 version 1.38, 2009/10/28 20:41:39
Line 259 
Line 259 
                 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;                  struct sigaction oact, 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 284 
Line 284 
                 act.sa_flags = SA_RESTART;                  act.sa_flags = SA_RESTART;
                 act.sa_handler = onsig;                  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);                          if (sigaction(sigtable[i], NULL, &oact) < 0 ||
                               oact.sa_handler != SIG_IGN &&
                               sigaction(sigtable[i], &act, NULL) < 0)
                                   err(2, "sigaction");
         } else          } else
                 outfile = outpath;                  outfile = outpath;
         if (outfp == NULL && (outfp = fopen(outfile, "w")) == NULL)          if (outfp == NULL && (outfp = fopen(outfile, "w")) == NULL)

Legend:
Removed from v.1.37  
changed lines
  Added in v.1.38