Skip to content

fix(process): only match the current user's Spotify and daemon processes - #4010

Merged
afonsojramos merged 1 commit into
v3-betafrom
fix/own-spotify-processes
Oct 2, 2026
Merged

afonsojramos merged 1 commit into
v3-betafrom
fix/own-spotify-processes

Conversation

@afonsojramos

Copy link
Copy Markdown
Member

Summary

On a machine where two accounts share one Spotify install, apply, restore and the other commands that stop Spotify also picked up the other account's Spotify, because pgrep and pkill matched every user's processes. The signal was refused, so each run waited out the 15-second shutdown timeout, then warned that the process "would not exit even when killed" and set it aside as stuck. The macOS daemon check had the same problem with another account's spicetify-daemon.

All pgrep and pkill calls on macOS and Linux now go through one helper that adds -U <uid>, using the current user's ID from id -u. If that ID can't be read, they fall back to the previous behaviour. Windows is unchanged.

Testing

On macOS, with a second account's Spotify running (PID 62208):

  • 3.0.0-rc.2: apply waited 15 seconds, warned Spotify process(es) [62208] would not exit even when killed, and took 26 seconds.
  • This branch: apply stopped only the current user's Spotify, printed no warnings, and took 15 seconds.

cargo clippy --workspace -- -D warnings, cargo fmt --check, and cargo test -p spicetify (166 passed) are clean. The existing lifecycle tests still find and kill the current user's processes.

@coderabbitai

coderabbitai Bot commented Oct 2, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: spicetify/cli/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 1a33aa8b-ff7e-4028-aa1a-c454702df44c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@afonsojramos
afonsojramos merged commit 23f6635 into v3-beta Oct 2, 2026
6 checks passed
@afonsojramos
afonsojramos deleted the fix/own-spotify-processes branch October 2, 2026 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant