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/09/22 06:56:06 UTC

[GitHub] [incubator-brpc] serverglen opened a new pull request #1252: Fix bvar command name truncated

serverglen opened a new pull request #1252:
URL: https://github.com/apache/incubator-brpc/pull/1252


   Fix bvar command name truncated when command_name more than 15 characters


----------------------------------------------------------------
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


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

Posted by GitBox <gi...@apache.org>.
serverglen commented on pull request #1252:
URL: https://github.com/apache/incubator-brpc/pull/1252#issuecomment-865626615


   @jamesge @zyearn 辛苦抽时间帮Review下,thanks.


-- 
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


[GitHub] [incubator-brpc] gydong commented on pull request #1252: Fix bvar command name truncated

Posted by GitBox <gi...@apache.org>.
gydong commented on pull request #1252:
URL: https://github.com/apache/incubator-brpc/pull/1252#issuecomment-696560506






----------------------------------------------------------------
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


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

Posted by GitBox <gi...@apache.org>.
serverglen commented on pull request #1252:
URL: https://github.com/apache/incubator-brpc/pull/1252#issuecomment-698662171






----------------------------------------------------------------
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


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

Posted by GitBox <gi...@apache.org>.
serverglen commented on pull request #1252:
URL: https://github.com/apache/incubator-brpc/pull/1252#issuecomment-697105651


   感觉这个持续集成不太稳定,你能帮我重试下吗?我自己重试的话只能先close,再open...


----------------------------------------------------------------
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


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

Posted by GitBox <gi...@apache.org>.
serverglen commented on pull request #1252:
URL: https://github.com/apache/incubator-brpc/pull/1252#issuecomment-698662171


   > > 感觉这个持续集成不太稳定,你能帮我重试下吗?我自己重试的话只能先close,再open...
   > 
   > 已重试
   
   辛苦再帮重新触发下持续集成吧


----------------------------------------------------------------
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


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

Posted by GitBox <gi...@apache.org>.
serverglen commented on pull request #1252:
URL: https://github.com/apache/incubator-brpc/pull/1252#issuecomment-873123937


   > > 这个基于 https://github.com/apache/incubator-brpc/blob/master/src/butil/process_util.h 中的ReadCommandLine改更好一些,现在这么改也不支持Mac OS。可以在process_util.h中改为两个函数ReadCommandLine和ReadCommandName,返回值也可以都改成std::string方便使用,不用传buf
   > 
   > 辛苦帮触发下重新构建(不太稳定),thanks
   @zyearn @chenzhangyi @jamesge 辛苦各位大佬帮看下哈,这个PR一年前在百度内部就已经合入了,也经过线上验证了的,thanks!


-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

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


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

Posted by GitBox <gi...@apache.org>.
serverglen commented on pull request #1252:
URL: https://github.com/apache/incubator-brpc/pull/1252#issuecomment-698791274


   > 这个基于 https://github.com/apache/incubator-brpc/blob/master/src/butil/process_util.h 中的ReadCommandLine改更好一些,现在这么改也不支持Mac OS。可以在process_util.h中改为两个函数ReadCommandLine和ReadCommandName,返回值也可以都改成std::string方便使用,不用传buf
   
   好的,我这两天重新提下pr


----------------------------------------------------------------
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


[GitHub] [incubator-brpc] serverglen removed a comment on pull request #1252: Fix bvar command name truncated

Posted by GitBox <gi...@apache.org>.
serverglen removed a comment on pull request #1252:
URL: https://github.com/apache/incubator-brpc/pull/1252#issuecomment-697073531


   > #1251
   
   > #1251
   
   


----------------------------------------------------------------
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


[GitHub] [incubator-brpc] gydong commented on pull request #1252: Fix bvar command name truncated

Posted by GitBox <gi...@apache.org>.
gydong commented on pull request #1252:
URL: https://github.com/apache/incubator-brpc/pull/1252#issuecomment-697111287


   > 感觉这个持续集成不太稳定,你能帮我重试下吗?我自己重试的话只能先close,再open...
   
   已重试


----------------------------------------------------------------
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


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

Posted by GitBox <gi...@apache.org>.
serverglen commented on pull request #1252:
URL: https://github.com/apache/incubator-brpc/pull/1252#issuecomment-865626615


   @jamesge @zyearn 辛苦抽时间帮Review下,thanks.


-- 
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


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

Posted by GitBox <gi...@apache.org>.
serverglen commented on pull request #1252:
URL: https://github.com/apache/incubator-brpc/pull/1252#issuecomment-712608459


   > 这个基于 https://github.com/apache/incubator-brpc/blob/master/src/butil/process_util.h 中的ReadCommandLine改更好一些,现在这么改也不支持Mac OS。可以在process_util.h中改为两个函数ReadCommandLine和ReadCommandName,返回值也可以都改成std::string方便使用,不用传buf
   
   辛苦帮触发下重新构建,thanks


----------------------------------------------------------------
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


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

Posted by GitBox <gi...@apache.org>.
serverglen commented on pull request #1252:
URL: https://github.com/apache/incubator-brpc/pull/1252#issuecomment-697144469


   > > 感觉这个持续集成不太稳定,你能帮我重试下吗?我自己重试的话只能先close,再open...
   > 
   > 已重试
   
   --2020-09-23 04:05:57--  (try:19)  http://www.us.apache.org/dist/thrift/0.11.0/thrift-0.11.0.tar.gz
   Connecting to www.us.apache.org (www.us.apache.org)|40.79.78.1|:80... failed: Connection timed out.
   Retrying.
   --2020-09-23 04:08:16--  (try:20)  http://www.us.apache.org/dist/thrift/0.11.0/thrift-0.11.0.tar.gz
   Connecting to www.us.apache.org (www.us.apache.org)|40.79.78.1|:80... failed: Connection timed out.
   Giving up.
   
   The command "wget http://www.us.apache.org/dist/thrift/0.11.0/thrift-0.11.0.tar.gz && tar -xf thrift-0.11.0.tar.gz && cd thrift-0.11.0/ && ./configure --prefix=/usr --with-rs=no --with-ruby=no --with-python=no --with-java=no --with-go=no --with-perl=no --with-php=no --with-csharp=no --with-erlang=no --with-lua=no --with-nodejs=no CXXFLAGS="-Wno-unused-variable" && make -j4 && sudo make install && cd -" failed and exited with 4 during .
   
   要不先优化下持续集成...
   


----------------------------------------------------------------
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


[GitHub] [incubator-brpc] serverglen removed a comment on pull request #1252: Fix bvar command name truncated

Posted by GitBox <gi...@apache.org>.
serverglen removed a comment on pull request #1252:
URL: https://github.com/apache/incubator-brpc/pull/1252#issuecomment-697073531


   > #1251
   
   > #1251
   
   


----------------------------------------------------------------
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


[GitHub] [incubator-brpc] gydong commented on pull request #1252: Fix bvar command name truncated

Posted by GitBox <gi...@apache.org>.
gydong commented on pull request #1252:
URL: https://github.com/apache/incubator-brpc/pull/1252#issuecomment-696560506


   https://github.com/apache/incubator-brpc/issues/1251


----------------------------------------------------------------
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


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

Posted by GitBox <gi...@apache.org>.
serverglen commented on a change in pull request #1252:
URL: https://github.com/apache/incubator-brpc/pull/1252#discussion_r514211727



##########
File path: src/butil/process_util.cc
##########
@@ -32,17 +33,22 @@
 
 namespace butil {
 
-ssize_t ReadCommandLine(char* buf, size_t len, bool with_args) {
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
+std::string ReadCommandLine(bool with_args) {

Review comment:
       这个改了,不依赖PATH_MAX了




----------------------------------------------------------------
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


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

Posted by GitBox <gi...@apache.org>.
serverglen commented on a change in pull request #1252:
URL: https://github.com/apache/incubator-brpc/pull/1252#discussion_r514689873



##########
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直接赋值就行了吧
   
   这些问题都改完了,辛苦在帮review下,还需要重新触发下持续集成...




----------------------------------------------------------------
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


[GitHub] [incubator-brpc] jamesge edited a comment on pull request #1252: Fix bvar command name truncated

Posted by GitBox <gi...@apache.org>.
jamesge edited a comment on pull request #1252:
URL: https://github.com/apache/incubator-brpc/pull/1252#issuecomment-698696614


   这个基于 https://github.com/apache/incubator-brpc/blob/master/src/butil/process_util.h 中的ReadCommandLine改更好一些,现在这么改也不支持Mac OS。可以在process_util.h中改为两个函数ReadCommandLine和ReadCommandName,返回值也可以都改成std::string方便使用,不用传buf


----------------------------------------------------------------
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


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

Posted by GitBox <gi...@apache.org>.
serverglen commented on pull request #1252:
URL: https://github.com/apache/incubator-brpc/pull/1252#issuecomment-697074887


   这种重新触发持续集成的方式不太好,如果有其他的触发方式,辛苦告知下哈。多谢!


----------------------------------------------------------------
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


[GitHub] [incubator-brpc] jamesge edited a comment on pull request #1252: Fix bvar command name truncated

Posted by GitBox <gi...@apache.org>.
jamesge edited a comment on pull request #1252:
URL: https://github.com/apache/incubator-brpc/pull/1252#issuecomment-698696614


   这个基于 https://github.com/apache/incubator-brpc/blob/master/src/butil/process_util.h 中的ReadCommandLine改更好一些,现在这么改也不支持Mac OS。可以在process_util.h中改为两个函数ReadCommandLine和ReadCommandName,返回值也可以都改成std::string方便使用,不用传buf


----------------------------------------------------------------
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


[GitHub] [incubator-brpc] jamesge commented on pull request #1252: Fix bvar command name truncated

Posted by GitBox <gi...@apache.org>.
jamesge commented on pull request #1252:
URL: https://github.com/apache/incubator-brpc/pull/1252#issuecomment-698696614


   这个基于https://github.com/apache/incubator-brpc/blob/master/src/butil/process_util.h中的ReadCommandLine改更好一些,现在这么改也不支持Mac OS。可以在process_util.h中改为两个函数ReadCommandLine和ReadCommandName,返回值也可以都改成std::string方便使用,不用传buf


----------------------------------------------------------------
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


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

Posted by GitBox <gi...@apache.org>.
serverglen commented on pull request #1252:
URL: https://github.com/apache/incubator-brpc/pull/1252#issuecomment-697073531






----------------------------------------------------------------
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


[GitHub] [incubator-brpc] serverglen closed pull request #1252: Fix bvar command name truncated

Posted by GitBox <gi...@apache.org>.
serverglen closed pull request #1252:
URL: https://github.com/apache/incubator-brpc/pull/1252


   


----------------------------------------------------------------
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


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

Posted by GitBox <gi...@apache.org>.
serverglen commented on pull request #1252:
URL: https://github.com/apache/incubator-brpc/pull/1252#issuecomment-697074640


   持续集成失败了,报错的地方不是我改的代码,我不知道怎么重试下持续集成,所以就先将pull request close了,然后重新open了一下,这样重新触发了持续集成。


----------------------------------------------------------------
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


[GitHub] [incubator-brpc] jamesge commented on pull request #1252: Fix bvar command name truncated

Posted by GitBox <gi...@apache.org>.
jamesge commented on pull request #1252:
URL: https://github.com/apache/incubator-brpc/pull/1252#issuecomment-698696614


   这个基于https://github.com/apache/incubator-brpc/blob/master/src/butil/process_util.h中的ReadCommandLine改更好一些,现在这么改也不支持Mac OS。可以在process_util.h中改为两个函数ReadCommandLine和ReadCommandName,返回值也可以都改成std::string方便使用,不用传buf


----------------------------------------------------------------
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


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

Posted by GitBox <gi...@apache.org>.
jamesge commented on a change in pull request #1252:
URL: https://github.com/apache/incubator-brpc/pull/1252#discussion_r508272917



##########
File path: src/brpc/builtin/common.cpp
##########
@@ -331,13 +331,10 @@ int FileChecksum(const char* file_path, unsigned char* checksum) {
 
 static pthread_once_t create_program_name_once = PTHREAD_ONCE_INIT;
 static const char* s_program_name = "unknown";
-static char s_cmdline[256];
+static std::string s_command_line;

Review comment:
       这个不用动,这么改在main函数后运行会有问题的

##########
File path: src/butil/process_util.cc
##########
@@ -32,17 +33,22 @@
 
 namespace butil {
 
-ssize_t ReadCommandLine(char* buf, size_t len, bool with_args) {
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
+std::string ReadCommandLine(bool with_args) {

Review comment:
       建议原来的函数保留(可以设为static),在外面再封装一层,另外这里用到的PATH_MAX支持除linux之外的系统吗?

##########
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直接赋值就行了吧




----------------------------------------------------------------
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


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

Posted by GitBox <gi...@apache.org>.
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


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

Posted by GitBox <gi...@apache.org>.
serverglen commented on pull request #1252:
URL: https://github.com/apache/incubator-brpc/pull/1252#issuecomment-697073531


   > #1251
   
   > #1251
   
   


----------------------------------------------------------------
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


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

Posted by GitBox <gi...@apache.org>.
serverglen commented on pull request #1252:
URL: https://github.com/apache/incubator-brpc/pull/1252#issuecomment-745700725


   > 这个基于 https://github.com/apache/incubator-brpc/blob/master/src/butil/process_util.h 中的ReadCommandLine改更好一些,现在这么改也不支持Mac OS。可以在process_util.h中改为两个函数ReadCommandLine和ReadCommandName,返回值也可以都改成std::string方便使用,不用传buf
   
   辛苦帮触发下重新构建(不太稳定),thanks


----------------------------------------------------------------
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


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

Posted by GitBox <gi...@apache.org>.
serverglen commented on pull request #1252:
URL: https://github.com/apache/incubator-brpc/pull/1252#issuecomment-697118016


   > 已重试
   
   多谢。


----------------------------------------------------------------
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


[GitHub] [incubator-brpc] serverglen closed pull request #1252: Fix bvar command name truncated

Posted by GitBox <gi...@apache.org>.
serverglen closed pull request #1252:
URL: https://github.com/apache/incubator-brpc/pull/1252


   


----------------------------------------------------------------
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