This is an automated email from the ASF dual-hosted git repository.

lorinlee pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brpc.git


The following commit(s) were added to refs/heads/master by this push:
     new 49038448 Remove wordexp
     new c67e2145 Merge pull request #2218 from wwbmmm/remove-wordexp
49038448 is described below

commit 49038448a718f3c5093cc9ebed6e316cf0041cc0
Author: wwbmmm <[email protected]>
AuthorDate: Fri Apr 21 19:21:08 2023 +0800

    Remove wordexp
---
 src/brpc/server.cpp | 17 -----------------
 1 file changed, 17 deletions(-)

diff --git a/src/brpc/server.cpp b/src/brpc/server.cpp
index 380ebb20..b4758ad8 100644
--- a/src/brpc/server.cpp
+++ b/src/brpc/server.cpp
@@ -16,7 +16,6 @@
 // under the License.
 
 
-#include <wordexp.h>                                // wordexp
 #include <iomanip>
 #include <arpa/inet.h>                              // inet_aton
 #include <fcntl.h>                                  // O_CREAT
@@ -1716,23 +1715,7 @@ void Server::GenerateVersionIfNeeded() {
     }
 }
 
-static std::string ExpandPath(const std::string &path) {
-    if (path.empty()) {
-        return std::string();
-    }
-    std::string ret;
-    wordexp_t p;
-    wordexp(path.c_str(), &p, 0);
-    CHECK_EQ(p.we_wordc, 1u);
-    if (p.we_wordc == 1) {
-        ret = p.we_wordv[0];
-    }
-    wordfree(&p);
-    return ret;
-}
-
 void Server::PutPidFileIfNeeded() {
-    _options.pid_file = ExpandPath(_options.pid_file);
     if (_options.pid_file.empty()) {
         return;
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to