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

Diff for /src/usr.bin/make/job.c between version 1.2 and 1.3

version 1.2, 1995/12/14 03:23:31 version 1.3, 1996/02/22 22:24:47
Line 1 
Line 1 
 /*      $NetBSD: job.c,v 1.13 1995/11/22 17:40:09 christos Exp $        */  /*      $NetBSD: job.c,v 1.14 1996/02/04 22:20:42 christos Exp $        */
   
 /*  /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.   * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
Line 42 
Line 42 
 #if 0  #if 0
 static char sccsid[] = "@(#)job.c       5.15 (Berkeley) 3/1/91";  static char sccsid[] = "@(#)job.c       5.15 (Berkeley) 3/1/91";
 #else  #else
 static char rcsid[] = "$NetBSD: job.c,v 1.13 1995/11/22 17:40:09 christos Exp $";  static char rcsid[] = "$NetBSD: job.c,v 1.14 1996/02/04 22:20:42 christos Exp $";
 #endif  #endif
 #endif /* not lint */  #endif /* not lint */
   
Line 109 
Line 109 
 #include <sys/wait.h>  #include <sys/wait.h>
 #include <fcntl.h>  #include <fcntl.h>
 #include <errno.h>  #include <errno.h>
   #include <utime.h>
 #include <signal.h>  #include <signal.h>
 #include <stdio.h>  #include <stdio.h>
 #include <string.h>  #include <string.h>
Line 375 
Line 376 
     int     signo;      /* The signal number we've received */      int     signo;      /* The signal number we've received */
 {  {
     sigset_t nmask, omask;      sigset_t nmask, omask;
       struct sigaction act;
   
     if (DEBUG(JOB)) {      if (DEBUG(JOB)) {
         (void) fprintf(stdout, "JobPassSig(%d) called.\n", signo);          (void) fprintf(stdout, "JobPassSig(%d) called.\n", signo);
Line 406 
Line 408 
      * This ensures that all our jobs get continued when we wake up before       * This ensures that all our jobs get continued when we wake up before
      * we take any other signal.       * we take any other signal.
      */       */
     sigfillset(&nmask);      sigemptyset(&nmask);
     (void) sigprocmask(SIG_BLOCK, &nmask, &omask);      sigaddset(&nmask, signo);
       sigprocmask(SIG_SETMASK, &nmask, &omask);
       act.sa_handler = SIG_DFL;
       sigemptyset(&act.sa_mask);
       act.sa_flags = 0;
       sigaction(signo, &act, NULL);
   
     if (DEBUG(JOB)) {      if (DEBUG(JOB)) {
         (void) fprintf(stdout,          (void) fprintf(stdout,
Line 423 
Line 430 
     Lst_ForEach(jobs, JobCondPassSig, (ClientData) &signo);      Lst_ForEach(jobs, JobCondPassSig, (ClientData) &signo);
   
     (void) sigprocmask(SIG_SETMASK, &omask, NULL);      (void) sigprocmask(SIG_SETMASK, &omask, NULL);
     (void) signal(signo, JobPassSig);      sigprocmask(SIG_SETMASK, &omask, NULL);
       act.sa_handler = JobPassSig;
       sigaction(signo, &act, NULL);
 }  }
   
 /*-  /*-
Line 1009 
Line 1017 
     Boolean       silent;       /* TRUE if should not print messages */      Boolean       silent;       /* TRUE if should not print messages */
 {  {
     int           streamID;     /* ID of stream opened to do the touch */      int           streamID;     /* ID of stream opened to do the touch */
     struct timeval times[2];    /* Times for utimes() call */      struct utimbuf times;       /* Times for utime() call */
   
     if (gn->type & (OP_JOIN|OP_USE|OP_EXEC|OP_OPTIONAL)) {      if (gn->type & (OP_JOIN|OP_USE|OP_EXEC|OP_OPTIONAL)) {
         /*          /*
Line 1035 
Line 1043 
     } else {      } else {
         char    *file = gn->path ? gn->path : gn->name;          char    *file = gn->path ? gn->path : gn->name;
   
         times[0].tv_sec = times[1].tv_sec = now;          times.actime = times.modtime = now;
         times[0].tv_usec = times[1].tv_usec = 0;          if (utime(file, &times) < 0){
         if (utimes(file, times) < 0){  
             streamID = open(file, O_RDWR | O_CREAT, 0666);              streamID = open(file, O_RDWR | O_CREAT, 0666);
   
             if (streamID >= 0) {              if (streamID >= 0) {

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3