[PR #5188] [MERGED] fix: skip os.removeAll() if PID does not exist #11704

Closed
opened 2026-04-12 23:36:23 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/5188
Author: @joshyan1
Created: 6/20/2024
Status: Merged
Merged: 6/20/2024
Merged by: @joshyan1

Base: mainHead: jyan/tmpdir2


📝 Commits (3)

📊 Changes

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

View changed files

📝 gpu/assets.go (+19 -12)

📄 Description

previously deleted all directories in $TMPDIR starting with ollama. Added a "continue" to skip the directory removal if a PID doesn't exist. We do this to prevent accidentally deleting directories in tmpdir that share the ollama name but aren't created by us for processes

resolves: https://github.com/ollama/ollama/issues/5129


🔄 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/5188 **Author:** [@joshyan1](https://github.com/joshyan1) **Created:** 6/20/2024 **Status:** ✅ Merged **Merged:** 6/20/2024 **Merged by:** [@joshyan1](https://github.com/joshyan1) **Base:** `main` ← **Head:** `jyan/tmpdir2` --- ### 📝 Commits (3) - [`23e899f`](https://github.com/ollama/ollama/commit/23e899f32d9f7b3bbe0b902a95c23be5a1254409) skip os.removeAll() if PID does not exist - [`4ebb66c`](https://github.com/ollama/ollama/commit/4ebb66c6623d85f4fb69db0406ddd05bdc2d893d) reformat error check - [`662568d`](https://github.com/ollama/ollama/commit/662568d453debcf77d2e077ef98cfb2cfab8575e) err!=nil check ### 📊 Changes **1 file changed** (+19 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `gpu/assets.go` (+19 -12) </details> ### 📄 Description previously deleted all directories in $TMPDIR starting with ollama. Added a "continue" to skip the directory removal if a PID doesn't exist. We do this to prevent accidentally deleting directories in tmpdir that share the ollama name but aren't created by us for processes resolves: https://github.com/ollama/ollama/issues/5129 --- <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-12 23:36:23 -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#11704