Browse Source

Merge pull request #2263 from CircuitSutra/fix_dts_compile_api_hang

Fixed dtc_compile API hangs as child process waits to perform "exit()" instead of "_exit()".
pull/1824/merge
Andrew Waterman 1 month ago
committed by GitHub
parent
commit
5eeeb91efa
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 6
      riscv/dts.cc

6
riscv/dts.cc

@ -122,11 +122,11 @@ static std::string dtc_compile(const std::string& dtc_input, bool compile)
step = write(dtc_input_pipe[1], buf+done, len-done);
if (step == -1) {
std::cerr << "Failed to write dtc_input: " << strerror(errno) << std::endl;
exit(1);
_exit(1);
}
}
close(dtc_input_pipe[1]);
exit(0);
_exit(0);
}
pid_t dtc_output_pid;
@ -146,7 +146,7 @@ static std::string dtc_compile(const std::string& dtc_input, bool compile)
close(dtc_output_pipe[1]);
execlp(DTC, DTC, "-O", output_type, "-I", input_type, nullptr);
std::cerr << "Failed to run " DTC ": " << strerror(errno) << std::endl;
exit(1);
_exit(1);
}
close(dtc_input_pipe[1]);

Loading…
Cancel
Save