Re: Unix domain sockets (UDS, AF_UNIX) in System.inheritedChannel() and elsewhere in Java + [JDK-8231187] + [JDK-8231358]

2019-09-23 Thread Michael McMahon
Hi Franta, I have filed https://bugs.openjdk.java.net/browse/JDK-8231358 to cover the general case of support for UNIX domain sockets. I think we should fix this bug independent of that though. The test case you supplied incl. native launcher was useful for this. So, thanks for that. The change

Re: Unix domain sockets (UDS, AF_UNIX) in System.inheritedChannel() and elsewhere in Java + [JDK-8231187] + [JDK-8231358]

2019-09-23 Thread František Kučera
In response to: and > Best to ask František to argue his approach on nio-dev. The concern with his approach is that it converts the local/remote address to an IPv4 address, makes it looks like

Re: Unix domain sockets (UDS, AF_UNIX) in System.inheritedChannel() and elsewhere in Java

2019-08-30 Thread Jaroslav Tulach
Hello Chris, Alan & all. Thank you for your discussions with František and thanks for outlining various directions to move his inquiry forward. > You will need to find a sponsor Right. I feel motivated to help, as I talked František into contributing rather than hacking around the problems he

Re: Unix domain sockets (UDS, AF_UNIX) in System.inheritedChannel() and elsewhere in Java

2019-08-19 Thread Chris Hegarty
Franta, > On 19 Aug 2019, at 09:34, František Kučera wrote: > > ... > can anyone tell me how to continue? I can change the code (the patch was only > proof-of-concept, fast hack) or change the design (e.g. creating a new module > instead of patching existing classes) but before I spend more ti

Re: Unix domain sockets (UDS, AF_UNIX) in System.inheritedChannel() and elsewhere in Java

2019-08-19 Thread František Kučera
Dne 23. 07. 19 v 17:46 Alan Bateman napsal(a): On 22/07/2019 09:16, František Kučera wrote: It is a stream or a datagram socket – just from different domain (UNIX instead of INET or INET6) – but they work the same way. So yes, when I create a stream or datagram unix domain socket e.g. in syst

Re: Unix domain sockets (UDS, AF_UNIX) in System.inheritedChannel() and elsewhere in Java

2019-07-23 Thread Alan Bateman
On 22/07/2019 09:16, František Kučera wrote: It is a stream or a datagram socket – just from different domain (UNIX instead of INET or INET6) – but they work the same way. So yes, when I create a stream or datagram unix domain socket e.g. in systemd (parent process), I can inherit it in Java

Re: Unix domain sockets (UDS, AF_UNIX) in System.inheritedChannel() and elsewhere in Java

2019-07-22 Thread František Kučera
Dne 21. 07. 19 v 20:13 Alan Bateman napsal(a): On 21/07/2019 11:01, František Kučera wrote: I would also prefer String or Path in the Java API but sockaddr_un.sun_path is defined in the POSIX standard as a byte array and it might be not only a file path but there are also "abstract" paths whic

Re: Unix domain sockets (UDS, AF_UNIX) in System.inheritedChannel() and elsewhere in Java

2019-07-21 Thread Alan Bateman
On 21/07/2019 11:01, František Kučera wrote: I would also prefer String or Path in the Java API but sockaddr_un.sun_path is defined in the POSIX standard as a byte array and it might be not only a file path but there are also "abstract" paths which have no representation on the filesystem – the

Re: Unix domain sockets (UDS, AF_UNIX) in System.inheritedChannel() and elsewhere in Java

2019-07-21 Thread František Kučera
Dne 19. 07. 19 v 18:10 Alan Bateman napsal(a): This is something that we've prototyped several times over the years but never came to a conclusion on whether to attempt to include it or not Albeit decades after other operating systems :-) even MS Windows are now able to work with unix domain soc

Re: Unix domain sockets (UDS, AF_UNIX) in System.inheritedChannel() and elsewhere in Java

2019-07-19 Thread Alan Bateman
On 19/07/2019 16:35, František Kučera wrote: Hello, I am interested in the unix domain sockets (UDS, AF_UNIX) support in Java. Java is able to inherit a channel from the parent process and access it through System.inheritedChannel(). The channel is passed as an open file descriptor (FD) to J

Unix domain sockets (UDS, AF_UNIX) in System.inheritedChannel() and elsewhere in Java

2019-07-19 Thread František Kučera
Hello, I am interested in the unix domain sockets (UDS, AF_UNIX) support in Java. Java is able to inherit a channel from the parent process and access it through System.inheritedChannel(). The channel is passed as an open file descriptor (FD) to Java form the parent process which is usually so