From 9276310e6c9be6148ea8b465b44af55413dc0dc0 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 25 Nov 2020 13:14:44 +0100 Subject: Remove unused method. --- src/lib/cross_linux.cc | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'src/lib/cross_linux.cc') diff --git a/src/lib/cross_linux.cc b/src/lib/cross_linux.cc index 2d43d3801..b6241ec1a 100644 --- a/src/lib/cross_linux.cc +++ b/src/lib/cross_linux.cc @@ -268,29 +268,6 @@ home_directory () return getenv("HOME"); } -string -command_and_read (string cmd) -{ - FILE* pipe = popen (cmd.c_str(), "r"); - if (!pipe) { - throw runtime_error ("popen failed"); - } - - string result; - char buffer[128]; - try { - while (fgets(buffer, sizeof(buffer), pipe)) { - result += buffer; - } - } catch (...) { - pclose (pipe); - throw; - } - - pclose (pipe); - return result; -} - /** @return true if this process is a 32-bit one running on a 64-bit-capable OS */ bool running_32_on_64 () -- cgit v1.2.3