ppalaga commented on a change in pull request #612: URL: https://github.com/apache/maven-mvnd/pull/612#discussion_r833389706
########## File path: common/src/main/java/org/mvndaemon/mvnd/common/DaemonRegistry.java ########## @@ -271,23 +271,35 @@ private void reset() { private static final int PROCESS_ID = getProcessId0(); private static int getProcessId0() { - String pid = null; - try { - final Path self = Paths.get("/proc/self"); - if (Files.exists(self)) { - pid = self.toRealPath().getFileName().toString(); + if (Os.current() == Os.LINUX) { Review comment: Yeah, `ProcessHandle.current().pid()` would simplify it a lot. I'd vote for using reflection as a fallback only if we have real world reports that the current code does not work on some specific platform. -- 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: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org