{"record":{"id":"34250a7cc72df0b0","repo":"jenkinsci/jenkins","slug":"restart-is-not-supported-on-mac-os-x","errorCode":null,"errorMessage":"Restart is not supported on Mac OS X","messagePattern":"Restart is not supported on Mac OS X","errorType":"exception","errorClass":"RestartNotSupportedException","httpStatus":null,"severity":"info","filePath":"core/src/main/java/hudson/lifecycle/UnixLifecycle.java","lineNumber":101,"sourceCode":"        String exe = args.getFirst();\n        LIBC.execvp(exe, new StringArray(args.toArray(new String[0])));\n        throw new IOException(\"Failed to exec '\" + exe + \"' \" + LIBC.strerror(Native.getLastError()));\n    }\n\n    @Override\n    public void verifyRestartable() throws RestartNotSupportedException {\n        if (!Functions.isGlibcSupported()) {\n            throw new RestartNotSupportedException(\"Restart is not supported on platforms without libc\");\n        }\n\n        // see http://lists.apple.com/archives/cocoa-dev/2005/Oct/msg00836.html and\n        // http://factor-language.blogspot.com/2007/07/execve-returning-enotsup-on-mac-os-x.html\n        // on Mac, execv fails with ENOTSUP if the caller is multi-threaded, resulting in an error like\n        // the one described in http://www.nabble.com/Restarting-hudson-not-working-on-MacOS--to24641779.html\n        //\n        // according to http://www.mail-archive.com/wine-devel@winehq.org/msg66797.html this now works on Snow Leopard\n        if (Platform.isDarwin() && !Platform.isSnowLeopardOrLater())\n            throw new RestartNotSupportedException(\"Restart is not supported on Mac OS X\");\n    }\n\n    private static final Logger LOGGER = Logger.getLogger(UnixLifecycle.class.getName());\n}\n","sourceCodeStart":83,"sourceCodeEnd":106,"githubUrl":"https://github.com/jenkinsci/jenkins/blob/2e228ff40b14dbc8b14ffbc6edf0e4383cf744fc/core/src/main/java/hudson/lifecycle/UnixLifecycle.java#L83-L106","documentation":"Thrown by UnixLifecycle.verifyRestartable() when Platform.isDarwin() is true and Platform.isSnowLeopardOrLater() is false. On Mac OS X versions before Snow Leopard (10.6), execv fails with ENOTSUP for multi-threaded callers (which the JVM always is), so restart is permanently disabled. The code comments cite Apple and wine mailing list evidence that Snow Leopard fixed this.","triggerScenarios":"Jenkins running on macOS where the OS version is detected as pre-10.6 (e.g. Leopard, Tiger). verifyRestartable() throws before the restart attempt is made.","commonSituations":"Legacy macOS hosts still running 10.5 or earlier in CI; misreported OS version on a hackintosh or VM; effectively a non-issue on any modern macOS (10.6+).","solutions":["Upgrade macOS to 10.6 Snow Leopard or later (trivially satisfied on any modern Mac)","If stuck on legacy macOS, restart Jenkins manually by stopping and starting the process","Run Jenkins on a Linux host instead for reliable restart support"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if (Platform.isDarwin() && !Platform.isSnowLeopardOrLater()) {\n    // restart unsupported; restart manually\n}","typeGuard":null,"tryCatchPattern":"try {\n    Lifecycle.get().verifyRestartable();\n} catch (RestartNotSupportedException e) {\n    // legacy macOS: restart manually\n}","preventionTips":["Run Jenkins on macOS 10.6 or later (effectively always true today)","For older macOS, restart the Jenkins process manually","Prefer Linux hosts for production Jenkins controllers"],"tags":["lifecycle","macos","darwin","restart","legacy-os"],"backgroundTag":null,"analyzedSha":"2e228ff40b14dbc8b14ffbc6edf0e4383cf744fc","analyzedAt":"2026-08-14T07:07:15.274Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}