diff options
author | Clifford Wolf <clifford@clifford.at> | 2015-01-22 20:45:53 +0100 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2015-01-22 20:45:53 +0100 |
commit | 5707ba22c10048bef7d5ad81d090e3dd31d779a4 (patch) | |
tree | 0cf913221f7498b4e1eef9b48769853c74dad9a3 /passes | |
parent | f6d94e87209103a6076bcef71235ac804ad32e86 (diff) | |
download | yosys-5707ba22c10048bef7d5ad81d090e3dd31d779a4.tar.gz yosys-5707ba22c10048bef7d5ad81d090e3dd31d779a4.tar.bz2 yosys-5707ba22c10048bef7d5ad81d090e3dd31d779a4.zip |
Improved xdot calling
Diffstat (limited to 'passes')
-rw-r--r-- | passes/cmds/show.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/passes/cmds/show.cc b/passes/cmds/show.cc index edc417c02..2779cabf9 100644 --- a/passes/cmds/show.cc +++ b/passes/cmds/show.cc @@ -794,7 +794,7 @@ struct ShowPass : public Pass { log_cmd_error("Nothing there to show.\n"); if (format != "dot" && !format.empty()) { - std::string cmd = stringf("dot -T%s -o '%s' '%s'", format.c_str(), out_file.c_str(), dot_file.c_str()); + std::string cmd = stringf("dot -T%s -o '%s.new' '%s' && mv '%s.new' '%s'", format.c_str(), out_file.c_str(), dot_file.c_str(), dot_file.c_str(), dot_file.c_str()); log("Exec: %s\n", cmd.c_str()); if (run_command(cmd) != 0) log_cmd_error("Shell command failed!\n"); @@ -807,7 +807,7 @@ struct ShowPass : public Pass { log_cmd_error("Shell command failed!\n"); } else if (format.empty()) { - std::string cmd = stringf("fuser -s '%s' || xdot '%s' < '%s' &", dot_file.c_str(), dot_file.c_str(), dot_file.c_str()); + std::string cmd = stringf("{ test -f '%s.pid' && fuser -s '%s.pid'; } || ( echo $$ >&3; exec xdot '%s'; ) 3> '%s.pid' &", dot_file.c_str(), dot_file.c_str(), dot_file.c_str(), dot_file.c_str()); log("Exec: %s\n", cmd.c_str()); if (run_command(cmd) != 0) log_cmd_error("Shell command failed!\n"); |