Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d8f0d68b authored by Colin Cross's avatar Colin Cross
Browse files

makeparallel: unset MAKEFLAGS and MAKELEVEL

makeparallel inherits values for MAKEFLAGS and MAKELEVEL from make
through the environment, but they should not be propagated to the child
process in case the child process tries to run make again.

Change-Id: I4c5df10ea8055cd1f1f61a892d5b1a7acb287bbb
parent 481cc5a0
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -341,6 +341,8 @@ int main(int argc, char* argv[]) {
    error(errno, errno, "fork failed");
    error(errno, errno, "fork failed");
  } else if (pid == 0) {
  } else if (pid == 0) {
    // child
    // child
    unsetenv("MAKEFLAGS");
    unsetenv("MAKELEVEL");
    int ret = execvp(path, args.data());
    int ret = execvp(path, args.data());
    if (ret < 0) {
    if (ret < 0) {
      error(errno, errno, "exec %s failed", path);
      error(errno, errno, "exec %s failed", path);