summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorespie <espie@openbsd.org>2007-07-30 09:49:00 +0000
committerespie <espie@openbsd.org>2007-07-30 09:49:00 +0000
commit405c49fa042d22cb96991e0e505797980bb14927 (patch)
tree949d80bbd63a24a6fe3e5adf9d36bd02465b3d14
parentnow that it's clean enough, one can extract some common code from (diff)
downloadwireguard-openbsd-405c49fa042d22cb96991e0e505797980bb14927.tar.xz
wireguard-openbsd-405c49fa042d22cb96991e0e505797980bb14927.zip
local is always true, so zap it.
okay miod@
-rw-r--r--usr.bin/make/compat.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/usr.bin/make/compat.c b/usr.bin/make/compat.c
index 5040991614f..8d4e55aa181 100644
--- a/usr.bin/make/compat.c
+++ b/usr.bin/make/compat.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: compat.c,v 1.51 2007/01/04 17:55:35 espie Exp $ */
+/* $OpenBSD: compat.c,v 1.52 2007/07/30 09:49:00 espie Exp $ */
/* $NetBSD: compat.c,v 1.14 1996/11/06 17:59:01 christos Exp $ */
/*
@@ -169,8 +169,6 @@ CompatRunCommand(LstNode cmdNode,/* Command to execute */
char ** volatile av; /* Argument vector for thing to exec */
int argc; /* Number of arguments in av or 0 if not
* dynamically allocated */
- bool local; /* true if command should be executed
- * locally */
char *cmd = (char *)Lst_Datum(cmdNode);
GNode *gn = (GNode *)gnp;
static char *shargv[4] = { _PATH_BSHELL };
@@ -271,22 +269,17 @@ CompatRunCommand(LstNode cmdNode,/* Command to execute */
}
}
- local = true;
-
/* Fork and execute the single command. If the fork fails, we abort. */
cpid = fork();
if (cpid == -1)
Fatal("Could not fork");
if (cpid == 0) {
- if (local) {
execvp(av[0], av);
if (errno == ENOENT)
fprintf(stderr, "%s: not found\n", av[0]);
else
perror(av[0]);
- } else
- (void)execv(av[0], av);
- _exit(1);
+ _exit(1);
}
if (bp) {
free(av);