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

Diff for /src/usr.bin/newsyslog/newsyslog.c between version 1.54 and 1.55

version 1.54, 2002/09/19 15:27:31 version 1.55, 2002/09/19 20:58:50
Line 248 
Line 248 
                         struct pidinfo *pltmp;                          struct pidinfo *pltmp;
   
                         for (pltmp = pidlist; pltmp < pl; pltmp++) {                          for (pltmp = pidlist; pltmp < pl; pltmp++) {
                                 if ((strcmp(pltmp->file, q->pidfile) == 0 &&                                  if ((q->pidfile &&
                                     pltmp->signal == q->signal) || (q->runcmd &&                                      strcmp(pltmp->file, q->pidfile) == 0 &&
                                       pltmp->signal == q->signal) ||
                                       (q->runcmd &&
                                     strcmp(q->runcmd, pltmp->file) == 0))                                      strcmp(q->runcmd, pltmp->file) == 0))
                                         break;                                          break;
                         }                          }
Line 345 
Line 347 
 run_command(char *cmd)  run_command(char *cmd)
 {  {
         if (noaction)          if (noaction)
                 (void)printf("\trun %s\n", cmd);                  (void)printf("run %s\n", cmd);
         else          else
                 system(cmd);                  system(cmd);
 }  }
Line 619 
Line 621 
                                 working->runcmd = strdup(++q);                                  working->runcmd = strdup(++q);
                                 if (working->runcmd == NULL)                                  if (working->runcmd == NULL)
                                         err(1, "strdup");                                          err(1, "strdup");
                                   working->pidfile = NULL;
                                   working->signal = -1;
                         } else if (strncmp(q, "SIG", 3) == 0) {                          } else if (strncmp(q, "SIG", 3) == 0) {
                                 int i;                                  int i;
   

Legend:
Removed from v.1.54  
changed lines
  Added in v.1.55