12 lines
851 B
Text
12 lines
851 B
Text
Index: passes/cmds/show.cc
|
|
--- passes/cmds/show.cc.orig
|
|
+++ passes/cmds/show.cc
|
|
@@ -880,7 +880,7 @@ struct ShowPass : public Pass {
|
|
#ifdef __APPLE__
|
|
std::string cmd = stringf("ps -fu %d | grep -q '[ ]%s' || xdot '%s' %s", getuid(), dot_file.c_str(), dot_file.c_str(), background.c_str());
|
|
#else
|
|
- std::string cmd = stringf("{ test -f '%s.pid' && fuser -s '%s.pid' 2> /dev/null; } || ( echo $$ >&3; exec xdot '%s'; ) 3> '%s.pid' %s", dot_file.c_str(), dot_file.c_str(), dot_file.c_str(), dot_file.c_str(), background.c_str());
|
|
+ std::string cmd = stringf("test -f '%s.pid' -a -n \"`fuser '%s.pid' 2>/dev/null`\" || ( echo $$ >&3; exec xdot '%s'; ) 3> '%s.pid' %s", dot_file.c_str(), dot_file.c_str(), dot_file.c_str(), dot_file.c_str(), background.c_str());
|
|
#endif
|
|
log("Exec: %s\n", cmd.c_str());
|
|
if (run_command(cmd) != 0)
|