diff options
| author | dsl <dsl@NetBSD.org> | 2006-10-11 07:01:44 +0000 |
|---|---|---|
| committer | dsl <dsl@NetBSD.org> | 2006-10-11 07:01:44 +0000 |
| commit | 505a3bb2b7066adce15773c4b99671ce5fffa7c0 (patch) | |
| tree | 5c0421072a448151ffa5751ec6e97cb0a8ff16ff /usr.bin/make/make.c | |
| parent | e160c7cdec66c5d034a90a8408d87d326cc860d8 (diff) | |
There is no need to resize the pollfd array, it can only ever have 2+maxJobs
entries, so allocate at startup.
Use an 'int jobPipe[2]' within the job structure, and create pipes directly
into it. Common up the code that creates all the pipes - making them all
non-block on the read side in the process.
Call Job_CatchChildren() directly from Job_CatchOutput() so that it only
gets called when a child actually exits.
NB: Something causes a 'pregnant pause' if (for example) you call 'nbmake obj'
in src/tools. Introduced between netbsd 3 and 4.
Diffstat (limited to 'usr.bin/make/make.c')
| -rw-r--r-- | usr.bin/make/make.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.bin/make/make.c b/usr.bin/make/make.c index f85fe979a42..2a3032467f7 100644 --- a/usr.bin/make/make.c +++ b/usr.bin/make/make.c @@ -1,4 +1,4 @@ -/* $NetBSD: make.c,v 1.64 2006/10/09 14:36:41 dsl Exp $ */ +/* $NetBSD: make.c,v 1.65 2006/10/11 07:01:44 dsl Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: make.c,v 1.64 2006/10/09 14:36:41 dsl Exp $"; +static char rcsid[] = "$NetBSD: make.c,v 1.65 2006/10/11 07:01:44 dsl Exp $"; #else #include <sys/cdefs.h> #ifndef lint #if 0 static char sccsid[] = "@(#)make.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: make.c,v 1.64 2006/10/09 14:36:41 dsl Exp $"); +__RCSID("$NetBSD: make.c,v 1.65 2006/10/11 07:01:44 dsl Exp $"); #endif #endif /* not lint */ #endif @@ -1230,7 +1230,6 @@ Make_Run(Lst targs) */ while (!Lst_IsEmpty(toBeMade) || jobTokensRunning > 0) { Job_CatchOutput(); - Job_CatchChildren(); (void)MakeStartJobs(); } |
