diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2002-03-02 13:42:52 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2002-03-02 13:42:52 +0000 |
commit | 367e6e91dd296fdd0027e17e32823b374fd69801 (patch) | |
tree | 1cbac0a9c59b6ec564f1659e61257ba88fba6e6d /usr.bin/make | |
parent | e28f40d7a8ac907d0394b6778a9306b869365b33 (diff) |
Kill JOB_REMIGRATE.
Diffstat (limited to 'usr.bin/make')
-rw-r--r-- | usr.bin/make/job.c | 58 | ||||
-rw-r--r-- | usr.bin/make/job.h | 3 |
2 files changed, 6 insertions, 55 deletions
diff --git a/usr.bin/make/job.c b/usr.bin/make/job.c index f203cf141c5..9b4e51288bf 100644 --- a/usr.bin/make/job.c +++ b/usr.bin/make/job.c @@ -1,5 +1,5 @@ /* $OpenPackages$ */ -/* $OpenBSD: job.c,v 1.48 2002/03/02 00:23:13 espie Exp $ */ +/* $OpenBSD: job.c,v 1.49 2002/03/02 13:42:51 espie Exp $ */ /* $NetBSD: job.c,v 1.16 1996/11/06 17:59:08 christos Exp $ */ /* @@ -765,10 +765,8 @@ JobFinish(job, status) MESSAGE(out, job->node); lastNode = job->node; } - if (!(job->flags & JOB_REMIGRATE)) { - (void)fprintf(out, "*** Stopped -- signal %d\n", - WSTOPSIG(*status)); - } + (void)fprintf(out, "*** Stopped -- signal %d\n", + WSTOPSIG(*status)); job->flags |= JOB_RESUME; Lst_AtEnd(&stoppedJobs, job); (void)fflush(out); @@ -779,7 +777,7 @@ JobFinish(job, status) * list to the running one (or re-stop it if concurrency is * exceeded) and go and get another child. */ - if (job->flags & (JOB_RESUME|JOB_REMIGRATE|JOB_RESTART)) { + if (job->flags & (JOB_RESUME|JOB_RESTART)) { if (usePipes && job->node != lastNode) { MESSAGE(out, job->node); lastNode = job->node; @@ -1241,53 +1239,7 @@ static void JobRestart(job) Job *job; /* Job to restart */ { - if (job->flags & JOB_REMIGRATE) { - if (DEBUG(JOB)) { - (void)fprintf(stdout, "*** remigrating %x(%s)\n", - job->pid, job->node->name); - (void)fflush(stdout); - } - - if (nLocal != maxLocal) { - /* - * Job cannot be remigrated, but there's room on the local - * machine, so resume the job and note that another - * local job has started. - */ - if (DEBUG(JOB)) { - (void)fprintf(stdout, "*** resuming on local machine\n"); - (void)fflush(stdout); - } - KILL(job->pid, SIGCONT); - nLocal +=1; - job->flags &= ~(JOB_REMIGRATE|JOB_RESUME); - } else { - /* - * Job cannot be restarted. Mark the table as full and - * place the job back on the list of stopped jobs. - */ - if (DEBUG(JOB)) { - (void)fprintf(stdout, "*** holding\n"); - (void)fflush(stdout); - } - Lst_AtFront(&stoppedJobs, job); - jobFull = true; - if (DEBUG(JOB)) { - (void)fprintf(stdout, "Job queue is full.\n"); - (void)fflush(stdout); - } - return; - } - Lst_AtEnd(&jobs, job); - nJobs += 1; - if (nJobs == maxJobs) { - jobFull = true; - if (DEBUG(JOB)) { - (void)fprintf(stdout, "Job queue is full.\n"); - (void)fflush(stdout); - } - } - } else if (job->flags & JOB_RESTART) { + if (job->flags & JOB_RESTART) { /* * Set up the control arguments to the shell. This is based on the * flags set earlier for this job. If the JOB_IGNERR flag is clear, diff --git a/usr.bin/make/job.h b/usr.bin/make/job.h index 0e96cac823b..2664b567d75 100644 --- a/usr.bin/make/job.h +++ b/usr.bin/make/job.h @@ -2,7 +2,7 @@ #define _JOB_H_ /* $OpenPackages$ */ -/* $OpenBSD: job.h,v 1.11 2002/03/02 00:23:14 espie Exp $ */ +/* $OpenBSD: job.h,v 1.12 2002/03/02 13:42:51 espie Exp $ */ /* $NetBSD: job.h,v 1.5 1996/11/06 17:59:10 christos Exp $ */ /* @@ -110,7 +110,6 @@ typedef struct Job_ { #define JOB_IGNDOTS 0x008 /* Ignore "..." lines when processing * commands */ #define JOB_FIRST 0x020 /* Job is first job for the node */ -#define JOB_REMIGRATE 0x040 /* Job needs to be remigrated */ #define JOB_RESTART 0x080 /* Job needs to be completely restarted */ #define JOB_RESUME 0x100 /* Job needs to be resumed b/c it stopped, * for some reason */ |