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

Diff for /src/usr.bin/calendar/calendar.c between version 1.27 and 1.28

version 1.27, 2011/09/12 21:23:00 version 1.28, 2012/01/31 08:29:25
Line 169 
Line 169 
                                 warn("fork");                                  warn("fork");
                                 continue;                                  continue;
                         case 0: /* child */                          case 0: /* child */
                                   (void)setpgid(getpid(), getpid());
                                 (void)setlocale(LC_ALL, "");                                  (void)setlocale(LC_ALL, "");
                                 if (setusercontext(NULL, pw, pw->pw_uid,                                  if (setusercontext(NULL, pw, pw->pw_uid,
                                     LOGIN_SETALL ^ LOGIN_SETLOGIN))                                      LOGIN_SETALL ^ LOGIN_SETLOGIN))
Line 214 
Line 215 
                                 /* It doesn't _really_ matter if the kill fails, e.g.                                  /* It doesn't _really_ matter if the kill fails, e.g.
                                  * if there's only a zombie now.                                   * if there's only a zombie now.
                                  */                                   */
                                 (void)kill(kid, SIGTERM);                                  if (getpgid(kid) != getpgrp())
                                           (void)killpg(getpgid(kid), SIGTERM);
                                   else
                                           (void)kill(kid, SIGTERM);
                                 warnx("uid %u did not finish in time", pw->pw_uid);                                  warnx("uid %u did not finish in time", pw->pw_uid);
                         }                          }
                         if (time(NULL) - t >= SECSPERDAY)                          if (time(NULL) - t >= SECSPERDAY)

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.28