ppalaga commented on a change in pull request #612: URL: https://github.com/apache/maven-mvnd/pull/612#discussion_r832682668
########## 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: I originally thought `if (Os.current() != Os.WINDOWS && Os.current() != Os.MAC)` would be better, because both UNKNOWN or any future expansion of the Os enum are likely to be Unix flavors implementing procfs. But I admit that assumption is rather weak and your proposal isn't actually bad because if `ManagementFactory.getRuntimeMXBean().getName().split()` does not work for some UNKNOWN or future Os, then somebody would complain and we can make the condition more specific. Thus :+1: -- 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