summaryrefslogtreecommitdiff
path: root/passes/cmds
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2014-10-12 10:57:15 +0200
committerClifford Wolf <clifford@clifford.at>2014-10-12 10:57:15 +0200
commitb1596bc0e7e5269fd610508f608f65f3aa696bd9 (patch)
treea02538fb81ddef273cac8cc3f382b3be644c2449 /passes/cmds
parentd2b8b48bf3bc6b202c31db62ef5e2b63041e775e (diff)
Added run_command() api to replace system() and popen()
Diffstat (limited to 'passes/cmds')
-rw-r--r--passes/cmds/show.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/passes/cmds/show.cc b/passes/cmds/show.cc
index 1599879a..c6335cb3 100644
--- a/passes/cmds/show.cc
+++ b/passes/cmds/show.cc
@@ -760,20 +760,20 @@ struct ShowPass : public Pass {
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());
log("Exec: %s\n", cmd.c_str());
- if (system(cmd.c_str()) != 0)
+ if (run_command(cmd) != 0)
log_cmd_error("Shell command failed!\n");
}
if (!viewer_exe.empty()) {
std::string cmd = stringf("%s '%s' &", viewer_exe.c_str(), out_file.c_str());
log("Exec: %s\n", cmd.c_str());
- if (system(cmd.c_str()) != 0)
+ if (run_command(cmd) != 0)
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());
log("Exec: %s\n", cmd.c_str());
- if (system(cmd.c_str()) != 0)
+ if (run_command(cmd) != 0)
log_cmd_error("Shell command failed!\n");
}