You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by GitBox <gi...@apache.org> on 2020/10/22 02:23:49 UTC

[GitHub] [incubator-brpc] serverglen commented on a change in pull request #1252: Fix bvar command name truncated

serverglen commented on a change in pull request #1252:
URL: https://github.com/apache/incubator-brpc/pull/1252#discussion_r509840932



##########
File path: src/bvar/default_variables.cpp
##########
@@ -592,9 +592,8 @@ class DiskStatReader {
 struct ReadSelfCmdline {
     std::string content;
     ReadSelfCmdline() {
-        char buf[1024];
-        const ssize_t nr = butil::ReadCommandLine(buf, sizeof(buf), true);
-        content.append(buf, nr);
+        std::string cmdline= butil::ReadCommandLine(true);

Review comment:
       > 给content直接赋值就行了吧
   
   这个pr我改下;
   之前我还提了另一个pr(https://github.com/apache/incubator-brpc/pull/1258),辛苦抽时间给看下哈




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org