From 8a1af4f87f2caf70e57b9d7a6a181600c82020de Mon Sep 17 00:00:00 2001 From: espie Date: Sun, 9 Jul 2017 15:28:00 +0000 Subject: [PATCH] there's no need to fork/exec to execute comments okay millert@ --- usr.bin/make/engine.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/usr.bin/make/engine.c b/usr.bin/make/engine.c index f6684cfa4ef..2b1437c3468 100644 --- a/usr.bin/make/engine.c +++ b/usr.bin/make/engine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: engine.c,v 1.52 2017/01/29 10:04:13 espie Exp $ */ +/* $OpenBSD: engine.c,v 1.53 2017/07/09 15:28:00 espie Exp $ */ /* * Copyright (c) 2012 Marc Espie. * @@ -784,6 +784,10 @@ do_run_command(Job *job) /* always flush for other stuff */ fflush(stdout); + /* Optimization: bypass comments entirely */ + if (*cmd == '#') + return false; + /* Fork and execute the single command. If the fork fails, we abort. */ switch (cpid = fork()) { case -1: -- 2.20.1