--- a/test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/Launcher.java Fri Nov 30 10:37:48 2018 +0530
+++ b/test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/Launcher.java Fri Nov 30 10:29:58 2018 +0000
@@ -62,6 +62,19 @@
launch0(cmdarray, fd);
}
+
+ /**
+ * Launch 'java' with specified class using a UnixDomainSocket pair linking calling
+ * process to the child VM. UnixDomainSocket is a simplified interface to PF_UNIX sockets
+ * which supports byte a time reads and writes.
+ */
+ public static UnixDomainSocket launchWithUnixDomainSocket(String className) throws IOException {
+ UnixDomainSocket[] socks = UnixDomainSocket.socketpair();
+ launch(className, null, null, socks[0].fd());
+ socks[0].close();
+ return socks[1];
+ }
+
/*
* Launch 'java' with specified class with the specified arguments (may be null).
* The launched process will inherit a connected TCP socket. The remote endpoint