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

Diff for /src/usr.bin/pkill/pkill.c between version 1.23 and 1.24

version 1.23, 2012/02/16 21:25:35 version 1.24, 2012/03/01 13:04:29
Line 115 
Line 115 
         char buf[_POSIX2_LINE_MAX], *mstr, **pargv, *p, *q;          char buf[_POSIX2_LINE_MAX], *mstr, **pargv, *p, *q;
         int i, j, ch, bestidx, rv, criteria;          int i, j, ch, bestidx, rv, criteria;
         int (*action)(struct kinfo_proc *, int);          int (*action)(struct kinfo_proc *, int);
         int did_action;  
         struct kinfo_proc *kp;          struct kinfo_proc *kp;
         struct list *li;          struct list *li;
         u_int32_t bestsec, bestusec;          u_int32_t bestsec, bestusec;
Line 406 
Line 405 
         /*          /*
          * Take the appropriate action for each matched process, if any.           * Take the appropriate action for each matched process, if any.
          */           */
         did_action = 0;  
         rv = STATUS_NOMATCH;          rv = STATUS_NOMATCH;
         for (i = 0, j = 0, kp = plist; i < nproc; i++, kp++) {          for (i = 0, j = 0, kp = plist; i < nproc; i++, kp++) {
                 if ((kp->p_flag & P_SYSTEM) != 0 || kp->p_pid == mypid)                  if ((kp->p_flag & P_SYSTEM) != 0 || kp->p_pid == mypid)
                         continue;                          continue;
                 if (selected[i]) {                  if (selected[i]) {
                         if (longfmt && !pgrep) {                          if (longfmt && !pgrep)
                                 did_action = 1;  
                                 printf("%d %s\n", (int)kp->p_pid, kp->p_comm);                                  printf("%d %s\n", (int)kp->p_pid, kp->p_comm);
                         }  
                         if (inverse)                          if (inverse)
                                 continue;                                  continue;
                 } else if (!inverse)                  } else if (!inverse)

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.24