You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@thrift.apache.org by GitBox <gi...@apache.org> on 2020/09/09 14:41:51 UTC

[GitHub] [thrift] deiv edited a comment on pull request #2235: Fix abstract unix socket name

deiv edited a comment on pull request #2235:
URL: https://github.com/apache/thrift/pull/2235#issuecomment-689605217


   I think is the other way around:
   
   The `path_.size() + 1` adds 1 to compesate for the null termination needed in the "pathname-based" unix socket type.
   
   If for example, you create an abstract unix socket server in thtift:
   ```c++
   ...
   new TServerSocket("\0abstract-socket");
   ...
   ```
   Searching for it in '/proc' `cat /proc/net/unix  | grep abstract-', gives:
   ```bash
   ... @abstract-socket@
   ```
   
   The last '@' is extra, due to the null char `path_.c_str()`, returns a null terminated string.
   


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