[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.25 and 1.29

version 1.25, 2005/11/16 16:45:11 version 1.29, 2015/02/08 23:40:34
Line 29 
Line 29 
  * SUCH DAMAGE.   * SUCH DAMAGE.
  */   */
   
 #ifndef lint  
 static const char copyright[] =  
 "@(#) Copyright (c) 1989, 1993\n\  
         The Regents of the University of California.  All rights reserved.\n";  
 #endif /* not lint */  
   
 #ifndef lint  
 #if 0  
 static const char sccsid[] = "@(#)calendar.c  8.3 (Berkeley) 3/25/94";  
 #else  
 static const char rcsid[] = "$OpenBSD$";  
 #endif  
 #endif /* not lint */  
   
 #include <sys/stat.h>  #include <sys/stat.h>
 #include <sys/types.h>  #include <sys/types.h>
 #include <sys/wait.h>  #include <sys/wait.h>
Line 97 
Line 83 
                         break;                          break;
   
                 case 'b':                  case 'b':
                         bodun_always++;                          bodun_always = 1;
                         break;                          break;
   
                 case 'f': /* other calendar file */                  case 'f': /* other calendar file */
Line 183 
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 228 
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)
Line 260 
Line 250 
 {  {
         (void)fprintf(stderr,          (void)fprintf(stderr,
             "usage: calendar [-ab] [-A num] [-B num] [-f calendarfile] "              "usage: calendar [-ab] [-A num] [-B num] [-f calendarfile] "
             "[-t [[[cc]yy][mm]]dd]\n");              "[-t [[[cc]yy]mm]dd]\n");
         exit(1);          exit(1);
 }  }
   

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.29