summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2011-11-14 00:18:38 +0000
committerPaul Smith <psmith@gnu.org>2011-11-14 00:18:38 +0000
commit462ce1ee208c845777874af6a952e05994382c95 (patch)
treeb80216784296d9dc9f709d1afdace3b09385ea66 /main.c
parente31cd9fd3f2ab8f4a8c1d0586c13b3b3ad4d4119 (diff)
downloadmake-462ce1ee208c845777874af6a952e05994382c95.tar.gz
In very obscure situations we may write the free token back to the pipe.
Don't do that. I couldn't come up with a repro case for this!
Diffstat (limited to 'main.c')
-rw-r--r--main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/main.c b/main.c
index 75eb4941..d260859a 100644
--- a/main.c
+++ b/main.c
@@ -3116,7 +3116,8 @@ clean_jobserver (int status)
"INTERNAL: Exiting with %u jobserver tokens (should be 0)!",
jobserver_tokens);
else
- while (jobserver_tokens--)
+ /* Don't write back the "free" token */
+ while (--jobserver_tokens)
{
int r;