3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-28 03:15:50 +00:00

Added run_command() api to replace system() and popen()

This commit is contained in:
Clifford Wolf 2014-10-12 10:57:15 +02:00
parent d2b8b48bf3
commit b1596bc0e7
6 changed files with 104 additions and 92 deletions

View file

@ -159,7 +159,7 @@ void Pass::call(RTLIL::Design *design, std::string command)
cmd_buf.back() == '\r' || cmd_buf.back() == '\n'))
cmd_buf.resize(cmd_buf.size()-1);
log_header("Shell command: %s\n", cmd_buf.c_str());
int retCode = system(cmd_buf.c_str());
int retCode = run_command(cmd_buf);
if (retCode != 0)
log_cmd_error("Shell command returned error code %d.\n", retCode);
return;