From 6af54f5ebd69b52e2e1c5286f8fad436f8bb93c2 Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Tue, 1 Sep 2015 16:01:39 +0200 Subject: cleanup --- redo.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/redo.c b/redo.c index 978e3d1..4351479 100644 --- a/redo.c +++ b/redo.c @@ -459,7 +459,6 @@ run_script(char *target, int implicit) char *orig_target = target; int old_dep_fd = dep_fd; int fd; - int shellwrap; char *dofile; pid_t pid; @@ -478,8 +477,6 @@ run_script(char *target, int implicit) exit(1); } - shellwrap = (access (dofile, X_OK) != 0); - fd = open(dofile, O_RDONLY); dprintf(dep_fd, "=%s %s\n", hashfile(fd), dofile); close(fd); @@ -515,7 +512,7 @@ djb-style default.o.do: setenvfd("REDO_DEP_FD", dep_fd); setenvfd("REDO_LEVEL", level + 1); - if (shellwrap) + if (access (dofile, X_OK) != 0) // run -x files with /bin/sh execl("/bin/sh", "/bin/sh", xflag > 0 ? "-ex" : "-e", dofile, target, basename, temp_target, (char *) 0); else -- cgit 1.4.1