Skip to content

Commit 611a872

Browse files
committed
remove RunCommand
1 parent d698d33 commit 611a872

File tree

2 files changed

+0
-15
lines changed

2 files changed

+0
-15
lines changed

source/loader/layers/sanitizer/common.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,4 @@ void *GetMemFunctionPointer(const char *);
100100

101101
std::string DemangleName(const std::string &name);
102102

103-
std::string RunCommand(const char *cmd);
104-
105103
} // namespace ur_sanitizer_layer

source/loader/layers/sanitizer/linux/sanitizer_utils.cpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,4 @@ std::string DemangleName(const std::string &name) {
6969
return result;
7070
}
7171

72-
std::string RunCommand(const char *cmd) {
73-
std::array<char, 128> buffer;
74-
std::string result;
75-
std::unique_ptr<FILE, decltype(&pclose)> pipe(popen(cmd, "r"), pclose);
76-
if (!pipe) {
77-
throw std::runtime_error("popen() failed!");
78-
}
79-
while (fgets(buffer.data(), buffer.size(), pipe.get()) != nullptr) {
80-
result += buffer.data();
81-
}
82-
return result;
83-
}
84-
8572
} // namespace ur_sanitizer_layer

0 commit comments

Comments
 (0)