@Override public void verifyRestartable() throws RestartNotSupportedException { // see http://lists.apple.com/archives/cocoa-dev/2005/Oct/msg00836.html and // http://factor-language.blogspot.com/2007/07/execve-returning-enotsup-on-mac-os-x.html // on Mac, execv fails with ENOTSUP if the caller is multi-threaded, resulting in an error like // the one described in http://www.nabble.com/Restarting-hudson-not-working-on-MacOS--to24641779.html if (Hudson.isDarwin()) { throw new RestartNotSupportedException("Restart is not supported on Mac OS X"); } else { try { if (!NativeUtils.getInstance().canRestartJavaProcess()) { throw new RestartNotSupportedException("Restart is not supported on this Platform"); } } catch (NativeAccessException exc) { throw new RestartNotSupportedException("Restart is not supported on this Platform"); } } } }