You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by GitBox <gi...@apache.org> on 2020/11/29 17:40:18 UTC

[GitHub] [tomcat-native] minfrin opened a new pull request #8: Expose support for Unix Domain Sockets in APR v1.6 and up.

minfrin opened a new pull request #8:
URL: https://github.com/apache/tomcat-native/pull/8


   This patch adds support for Unix Domain Sockets, that was added to APR v1.6.
   
   This consists of the addition of the APR_UNIX family, as well as adding a cleanup to remove the socket file on shutdown.


----------------------------------------------------------------
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@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[GitHub] [tomcat-native] michael-o commented on pull request #8: Expose support for Unix Domain Sockets in APR v1.6 and up.

Posted by GitBox <gi...@apache.org>.
michael-o commented on pull request #8:
URL: https://github.com/apache/tomcat-native/pull/8#issuecomment-737306223


   We are all set, I will merge this week. Thank you for the fantastic cooperation.


----------------------------------------------------------------
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@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[GitHub] [tomcat-native] minfrin commented on a change in pull request #8: Expose support for Unix Domain Sockets in APR v1.6 and up.

Posted by GitBox <gi...@apache.org>.
minfrin commented on a change in pull request #8:
URL: https://github.com/apache/tomcat-native/pull/8#discussion_r533553364



##########
File path: xdocs/index.xml
##########
@@ -174,6 +175,14 @@ list of changes.
     <p>
       Please see the Apache Tomcat documentation for configuration specifics.
     </p>
+
+    <p>
+      When using unix domain sockets a cleanup is registered to delete the

Review comment:
       It's fixed.




----------------------------------------------------------------
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@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[GitHub] [tomcat-native] minfrin commented on a change in pull request #8: Expose support for Unix Domain Sockets in APR v1.6 and up.

Posted by GitBox <gi...@apache.org>.
minfrin commented on a change in pull request #8:
URL: https://github.com/apache/tomcat-native/pull/8#discussion_r532253902



##########
File path: native/src/info.c
##########
@@ -198,6 +198,9 @@ static void fill_ainfo(JNIEnv *e, jobject obj, apr_sockaddr_t *info)
     if (info->family == APR_UNSPEC) f = 0;
     else if (info->family == APR_INET) f = 1;
     else if (info->family == APR_INET6) f = 2;
+#ifdef APR_UNIX
+    else if (info->family == APR_UNIX) f = 3;

Review comment:
       This is code rather than a macro.




----------------------------------------------------------------
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@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[GitHub] [tomcat-native] michael-o commented on a change in pull request #8: Expose support for Unix Domain Sockets in APR v1.6 and up.

Posted by GitBox <gi...@apache.org>.
michael-o commented on a change in pull request #8:
URL: https://github.com/apache/tomcat-native/pull/8#discussion_r532255441



##########
File path: native/src/network.c
##########
@@ -79,6 +80,17 @@ static apr_status_t sp_socket_cleanup(void *data)
         (*s->net->cleanup)(s->opaque);
     if (s->sock) {
         apr_socket_t *as = s->sock;
+#ifdef APR_UNIX
+        apr_sockaddr_t *sa = NULL;
+        apr_socket_addr_get(&sa, APR_LOCAL, as);
+        if (sa && sa->family == APR_UNIX) {
+            char *sock;
+            apr_getnameinfo(&sock, sa, 0);
+            if (sock) {
+                apr_file_remove(sock, s->pool);

Review comment:
       This is an interesting one, the file is deleted *before* the socket is closed?




----------------------------------------------------------------
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@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[GitHub] [tomcat-native] minfrin commented on a change in pull request #8: Expose support for Unix Domain Sockets in APR v1.6 and up.

Posted by GitBox <gi...@apache.org>.
minfrin commented on a change in pull request #8:
URL: https://github.com/apache/tomcat-native/pull/8#discussion_r532263073



##########
File path: native/src/network.c
##########
@@ -316,6 +337,11 @@ TCN_IMPLEMENT_CALL(jint, Socket, bind)(TCN_STDARGS, jlong sock,
     TCN_ASSERT(sock != 0);
     TCN_ASSERT(s->sock != NULL);
     rv = (jint)apr_socket_bind(s->sock, a);
+
+    apr_pool_cleanup_register(s->pool, (const void *)s,

Review comment:
       REUSEADDR doesn't appear to work with UDS, alas.
   
   I went digging for best practice, and the thinking seems to be that deleting the file at startup is bad as it masks failures. I've gone with the delete-on-exit route.
   
   The create() function creates the socket pool, the bind() function creates the socket file and registers the socket cleanup, and the destroy() function runs the cleanup. APR itself will run the cleanup on shutdown as long as the java process exits, tomcat itself doesn't need to exit cleanly.
   
   If the java process crashes, the socket file needs to be manually deleted, this appears to be how this is handled elsewhere.
   




----------------------------------------------------------------
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@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[GitHub] [tomcat-native] michael-o commented on a change in pull request #8: Expose support for Unix Domain Sockets in APR v1.6 and up.

Posted by GitBox <gi...@apache.org>.
michael-o commented on a change in pull request #8:
URL: https://github.com/apache/tomcat-native/pull/8#discussion_r532249132



##########
File path: java/org/apache/tomcat/jni/Address.java
##########
@@ -40,8 +40,9 @@
 
     /**
      * Create apr_sockaddr_t from hostname, address family, and port.
-     * @param hostname The hostname or numeric address string to resolve/parse, or
-     *               NULL to build an address that corresponds to 0.0.0.0 or ::
+     * @param hostname The hostname or numeric address string to resolve/parse, the

Review comment:
       I think the generic name is address which represents `hostname:port`,  `IPv4:port' , `[IPv6]:port`, '/path`. Should we deprecate this one and replace with a new one?

##########
File path: native/src/info.c
##########
@@ -198,6 +198,9 @@ static void fill_ainfo(JNIEnv *e, jobject obj, apr_sockaddr_t *info)
     if (info->family == APR_UNSPEC) f = 0;
     else if (info->family == APR_INET) f = 1;
     else if (info->family == APR_INET6) f = 2;
+#ifdef APR_UNIX
+    else if (info->family == APR_UNIX) f = 3;

Review comment:
       Just like here...

##########
File path: native/src/network.c
##########
@@ -79,6 +80,15 @@ static apr_status_t sp_socket_cleanup(void *data)
         (*s->net->cleanup)(s->opaque);
     if (s->sock) {
         apr_socket_t *as = s->sock;
+        apr_sockaddr_t *sa = NULL;
+        apr_socket_addr_get(&sa, APR_LOCAL, as);
+        if (sa && sa->family == APR_UNIX) {

Review comment:
       If you guard all the rest with `#ifdef APR_UNIX` why not this one?

##########
File path: native/include/tcn.h
##########
@@ -281,11 +281,20 @@ typedef struct {
 #define APR_INET6 APR_INET
 #endif
 
+#ifdef APR_UNIX
 #define GET_S_FAMILY(T, F)           \
     if (F == 0) T = APR_UNSPEC;      \
     else if (F == 1) T = APR_INET;   \
     else if (F == 2) T = APR_INET6;  \
+    else if (F == 3) T = APR_UNIX;   \

Review comment:
       Why not make the ifdef around this line?




----------------------------------------------------------------
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@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[GitHub] [tomcat-native] minfrin commented on a change in pull request #8: Expose support for Unix Domain Sockets in APR v1.6 and up.

Posted by GitBox <gi...@apache.org>.
minfrin commented on a change in pull request #8:
URL: https://github.com/apache/tomcat-native/pull/8#discussion_r534162543



##########
File path: java/org/apache/tomcat/jni/Address.java
##########
@@ -40,8 +40,9 @@
 
     /**
      * Create apr_sockaddr_t from hostname, address family, and port.
-     * @param hostname The hostname or numeric address string to resolve/parse, or
-     *               NULL to build an address that corresponds to 0.0.0.0 or ::
+     * @param hostname The hostname or numeric address string to resolve/parse, the
+     *                 path of the unix domain socket, or NULL to build an address

Review comment:
       Done.




----------------------------------------------------------------
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@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[GitHub] [tomcat-native] minfrin commented on a change in pull request #8: Expose support for Unix Domain Sockets in APR v1.6 and up.

Posted by GitBox <gi...@apache.org>.
minfrin commented on a change in pull request #8:
URL: https://github.com/apache/tomcat-native/pull/8#discussion_r532261117



##########
File path: native/src/network.c
##########
@@ -79,6 +80,17 @@ static apr_status_t sp_socket_cleanup(void *data)
         (*s->net->cleanup)(s->opaque);
     if (s->sock) {
         apr_socket_t *as = s->sock;
+#ifdef APR_UNIX
+        apr_sockaddr_t *sa = NULL;
+        apr_socket_addr_get(&sa, APR_LOCAL, as);
+        if (sa && sa->family == APR_UNIX) {
+            char *sock;
+            apr_getnameinfo(&sock, sa, 0);
+            if (sock) {
+                apr_file_remove(sock, s->pool);

Review comment:
       In theory the order shouldn't matter, the socket becomes invisible once deleted.
   
   I've redone the cleanup as there is no way to distinguish between cleaning up the main listening socket and the individual connections. Now the cleanup only runs when the pool created by create is destroyed.




----------------------------------------------------------------
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@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[GitHub] [tomcat-native] minfrin commented on a change in pull request #8: Expose support for Unix Domain Sockets in APR v1.6 and up.

Posted by GitBox <gi...@apache.org>.
minfrin commented on a change in pull request #8:
URL: https://github.com/apache/tomcat-native/pull/8#discussion_r532505101



##########
File path: native/src/network.c
##########
@@ -316,6 +337,11 @@ TCN_IMPLEMENT_CALL(jint, Socket, bind)(TCN_STDARGS, jlong sock,
     TCN_ASSERT(sock != 0);
     TCN_ASSERT(s->sock != NULL);
     rv = (jint)apr_socket_bind(s->sock, a);
+
+    apr_pool_cleanup_register(s->pool, (const void *)s,

Review comment:
       It's done.




----------------------------------------------------------------
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@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[GitHub] [tomcat-native] minfrin commented on a change in pull request #8: Expose support for Unix Domain Sockets in APR v1.6 and up.

Posted by GitBox <gi...@apache.org>.
minfrin commented on a change in pull request #8:
URL: https://github.com/apache/tomcat-native/pull/8#discussion_r532251725



##########
File path: native/include/tcn.h
##########
@@ -281,11 +281,20 @@ typedef struct {
 #define APR_INET6 APR_INET
 #endif
 
+#ifdef APR_UNIX
 #define GET_S_FAMILY(T, F)           \
     if (F == 0) T = APR_UNSPEC;      \
     else if (F == 1) T = APR_INET;   \
     else if (F == 2) T = APR_INET6;  \
+    else if (F == 3) T = APR_UNIX;   \

Review comment:
       My compiler doesn't like this one - doesn't seem possible to put an ifdef inside a macro.
   




----------------------------------------------------------------
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@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[GitHub] [tomcat-native] minfrin commented on pull request #8: Expose support for Unix Domain Sockets in APR v1.6 and up.

Posted by GitBox <gi...@apache.org>.
minfrin commented on pull request #8:
URL: https://github.com/apache/tomcat-native/pull/8#issuecomment-737339797


   > We are all set, I will merge this week. Thank you for the fantastic cooperation.
   
   Thank you so much for the help, I really appreciate it.
   


----------------------------------------------------------------
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@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[GitHub] [tomcat-native] michael-o commented on a change in pull request #8: Expose support for Unix Domain Sockets in APR v1.6 and up.

Posted by GitBox <gi...@apache.org>.
michael-o commented on a change in pull request #8:
URL: https://github.com/apache/tomcat-native/pull/8#discussion_r532264241



##########
File path: native/src/network.c
##########
@@ -316,6 +337,11 @@ TCN_IMPLEMENT_CALL(jint, Socket, bind)(TCN_STDARGS, jlong sock,
     TCN_ASSERT(sock != 0);
     TCN_ASSERT(s->sock != NULL);
     rv = (jint)apr_socket_bind(s->sock, a);
+
+    apr_pool_cleanup_register(s->pool, (const void *)s,

Review comment:
       OK, can you document the procedure in the case of a crash scenario?




----------------------------------------------------------------
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@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[GitHub] [tomcat-native] michael-o commented on a change in pull request #8: Expose support for Unix Domain Sockets in APR v1.6 and up.

Posted by GitBox <gi...@apache.org>.
michael-o commented on a change in pull request #8:
URL: https://github.com/apache/tomcat-native/pull/8#discussion_r532255441



##########
File path: native/src/network.c
##########
@@ -79,6 +80,17 @@ static apr_status_t sp_socket_cleanup(void *data)
         (*s->net->cleanup)(s->opaque);
     if (s->sock) {
         apr_socket_t *as = s->sock;
+#ifdef APR_UNIX
+        apr_sockaddr_t *sa = NULL;
+        apr_socket_addr_get(&sa, APR_LOCAL, as);
+        if (sa && sa->family == APR_UNIX) {
+            char *sock;
+            apr_getnameinfo(&sock, sa, 0);
+            if (sock) {
+                apr_file_remove(sock, s->pool);

Review comment:
       This isn't an interesting one, the file is deleted *before* the socket is closed?




----------------------------------------------------------------
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@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[GitHub] [tomcat-native] michael-o commented on a change in pull request #8: Expose support for Unix Domain Sockets in APR v1.6 and up.

Posted by GitBox <gi...@apache.org>.
michael-o commented on a change in pull request #8:
URL: https://github.com/apache/tomcat-native/pull/8#discussion_r532254706



##########
File path: java/org/apache/tomcat/jni/Address.java
##########
@@ -40,8 +40,9 @@
 
     /**
      * Create apr_sockaddr_t from hostname, address family, and port.
-     * @param hostname The hostname or numeric address string to resolve/parse, or
-     *               NULL to build an address that corresponds to 0.0.0.0 or ::
+     * @param hostname The hostname or numeric address string to resolve/parse, the

Review comment:
       OK, consistency makes sense. I wonder why this has not been addressed in 1.7 or 2.0.




----------------------------------------------------------------
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@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[GitHub] [tomcat-native] michael-o commented on a change in pull request #8: Expose support for Unix Domain Sockets in APR v1.6 and up.

Posted by GitBox <gi...@apache.org>.
michael-o commented on a change in pull request #8:
URL: https://github.com/apache/tomcat-native/pull/8#discussion_r532254789



##########
File path: native/include/tcn.h
##########
@@ -281,11 +281,20 @@ typedef struct {
 #define APR_INET6 APR_INET
 #endif
 
+#ifdef APR_UNIX
 #define GET_S_FAMILY(T, F)           \
     if (F == 0) T = APR_UNSPEC;      \
     else if (F == 1) T = APR_INET;   \
     else if (F == 2) T = APR_INET6;  \
+    else if (F == 3) T = APR_UNIX;   \

Review comment:
       Right, I completely missed this one that this is a macro. Apologies.




----------------------------------------------------------------
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@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[GitHub] [tomcat-native] michael-o commented on a change in pull request #8: Expose support for Unix Domain Sockets in APR v1.6 and up.

Posted by GitBox <gi...@apache.org>.
michael-o commented on a change in pull request #8:
URL: https://github.com/apache/tomcat-native/pull/8#discussion_r532261154



##########
File path: native/src/network.c
##########
@@ -316,6 +337,11 @@ TCN_IMPLEMENT_CALL(jint, Socket, bind)(TCN_STDARGS, jlong sock,
     TCN_ASSERT(sock != 0);
     TCN_ASSERT(s->sock != NULL);
     rv = (jint)apr_socket_bind(s->sock, a);
+
+    apr_pool_cleanup_register(s->pool, (const void *)s,

Review comment:
       OK, so basically when the Tomcat instance is shut down and all memory pools cleared, the file is removed. Is the socket information retained that long? What will happen when the process crashes, will a restart rebind to the same sock file with `REUSEADDR`?




----------------------------------------------------------------
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@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[GitHub] [tomcat-native] michael-o commented on a change in pull request #8: Expose support for Unix Domain Sockets in APR v1.6 and up.

Posted by GitBox <gi...@apache.org>.
michael-o commented on a change in pull request #8:
URL: https://github.com/apache/tomcat-native/pull/8#discussion_r533555103



##########
File path: java/org/apache/tomcat/jni/Address.java
##########
@@ -40,8 +40,9 @@
 
     /**
      * Create apr_sockaddr_t from hostname, address family, and port.
-     * @param hostname The hostname or numeric address string to resolve/parse, or
-     *               NULL to build an address that corresponds to 0.0.0.0 or ::
+     * @param hostname The hostname or numeric address string to resolve/parse, the
+     *                 path of the unix domain socket, or NULL to build an address

Review comment:
       Darn, I missed that one.




----------------------------------------------------------------
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@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[GitHub] [tomcat-native] michael-o commented on a change in pull request #8: Expose support for Unix Domain Sockets in APR v1.6 and up.

Posted by GitBox <gi...@apache.org>.
michael-o commented on a change in pull request #8:
URL: https://github.com/apache/tomcat-native/pull/8#discussion_r533486240



##########
File path: xdocs/index.xml
##########
@@ -174,6 +175,14 @@ list of changes.
     <p>
       Please see the Apache Tomcat documentation for configuration specifics.
     </p>
+
+    <p>
+      When using unix domain sockets a cleanup is registered to delete the

Review comment:
       Last nit, use Unix Domain Sockets (uppercase) consistently.




----------------------------------------------------------------
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@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[GitHub] [tomcat-native] minfrin commented on a change in pull request #8: Expose support for Unix Domain Sockets in APR v1.6 and up.

Posted by GitBox <gi...@apache.org>.
minfrin commented on a change in pull request #8:
URL: https://github.com/apache/tomcat-native/pull/8#discussion_r532253991



##########
File path: native/src/network.c
##########
@@ -79,6 +80,15 @@ static apr_status_t sp_socket_cleanup(void *data)
         (*s->net->cleanup)(s->opaque);
     if (s->sock) {
         apr_socket_t *as = s->sock;
+        apr_sockaddr_t *sa = NULL;
+        apr_socket_addr_get(&sa, APR_LOCAL, as);
+        if (sa && sa->family == APR_UNIX) {

Review comment:
       This one is a mistake.
   




----------------------------------------------------------------
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@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[GitHub] [tomcat-native] minfrin commented on pull request #8: Expose support for Unix Domain Sockets in APR v1.6 and up.

Posted by GitBox <gi...@apache.org>.
minfrin commented on pull request #8:
URL: https://github.com/apache/tomcat-native/pull/8#issuecomment-735430773


   Bugzilla here: https://bz.apache.org/bugzilla/show_bug.cgi?id=64942


----------------------------------------------------------------
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@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[GitHub] [tomcat-native] asfgit closed pull request #8: Expose support for Unix Domain Sockets in APR v1.6 and up.

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #8:
URL: https://github.com/apache/tomcat-native/pull/8


   


----------------------------------------------------------------
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@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[GitHub] [tomcat-native] minfrin commented on a change in pull request #8: Expose support for Unix Domain Sockets in APR v1.6 and up.

Posted by GitBox <gi...@apache.org>.
minfrin commented on a change in pull request #8:
URL: https://github.com/apache/tomcat-native/pull/8#discussion_r532251226



##########
File path: java/org/apache/tomcat/jni/Address.java
##########
@@ -40,8 +40,9 @@
 
     /**
      * Create apr_sockaddr_t from hostname, address family, and port.
-     * @param hostname The hostname or numeric address string to resolve/parse, or
-     *               NULL to build an address that corresponds to 0.0.0.0 or ::
+     * @param hostname The hostname or numeric address string to resolve/parse, the

Review comment:
       This call matches the signature of the APR function, which stayed the same:
   
   http://apr.apache.org/docs/apr/1.6/group__apr__network__io.html#gaa2f399ca2b60b35c0abf7630298c6c9f
   
   My feeling is to keep this aligned, even though "hostname" is technically incorrect.




----------------------------------------------------------------
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@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org