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