[PR #13737] [MERGED] app: allow macOS app to terminate during system shutdown #14370

Closed
opened 2026-04-13 00:51:59 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/13737
Author: @hoyyeva
Created: 1/16/2026
Status: Merged
Merged: 1/16/2026
Merged by: @hoyyeva

Base: mainHead: hoyyeva/macos-shutdown-blocking


📝 Commits (1)

  • 67a8a92 app: allow macOS app to terminate during system shutdown

📊 Changes

1 file changed (+19 additions, -0 deletions)

View changed files

📝 app/cmd/app/app_darwin.m (+19 -0)

📄 Description

On macOS, users would see "Some updates could not be installed because
ollama interrupted restarts" because the app was blocking system
shutdown/restart requests.

The app's applicationShouldTerminate: always returned NSTerminateCancel
to hide to the menu bar instead of quitting. This also blocked macOS
system events like shutdown, restart, and logout.

Fix by listening for NSWorkspaceWillPowerOffNotification and allowing
termination when the system is shutting down, while still hiding to
menu bar for user-initiated quit (Cmd+Q).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/13737 **Author:** [@hoyyeva](https://github.com/hoyyeva) **Created:** 1/16/2026 **Status:** ✅ Merged **Merged:** 1/16/2026 **Merged by:** [@hoyyeva](https://github.com/hoyyeva) **Base:** `main` ← **Head:** `hoyyeva/macos-shutdown-blocking` --- ### 📝 Commits (1) - [`67a8a92`](https://github.com/ollama/ollama/commit/67a8a92792a76616a19bf845ea417718e8f7ae44) app: allow macOS app to terminate during system shutdown ### 📊 Changes **1 file changed** (+19 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `app/cmd/app/app_darwin.m` (+19 -0) </details> ### 📄 Description On macOS, users would see "Some updates could not be installed because `ollama` interrupted restarts" because the app was blocking system shutdown/restart requests. The app's `applicationShouldTerminate`: always returned NSTerminateCancel to hide to the menu bar instead of quitting. This also blocked macOS system events like shutdown, restart, and logout. Fix by listening for NSWorkspaceWillPowerOffNotification and allowing termination when the system is shutting down, while still hiding to menu bar for user-initiated quit (Cmd+Q). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-13 00:51:59 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#14370