Skip to content

fix: KillProcess should push 0 when nothing found#49

Merged
amrbashir merged 2 commits into
tauri-apps:devfrom
Legend-Master:kill-process-no-processes
Nov 2, 2025
Merged

fix: KillProcess should push 0 when nothing found#49
amrbashir merged 2 commits into
tauri-apps:devfrom
Legend-Master:kill-process-no-processes

Conversation

@Legend-Master
Copy link
Copy Markdown
Contributor

@Legend-Master Legend-Master commented Nov 1, 2025

KillProcess and KillProcessCurrentUser will be pushing 0 to the stack instead of 1 when no processes were found

The idea behind KillProcess is to kill all the processes with the given name, so if we didn't find anything, it should just return success since everything with that name are now killed, at least that's the case for our use cases (or alternatively we could return something else to indicate this)

Fix

tauri-apps/tauri#14400

@FabianLars FabianLars requested a review from amrbashir November 1, 2025 15:01
Copy link
Copy Markdown
Member

@amrbashir amrbashir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should return a totally different return value, for example 3 indicating there were no processes found with the provided name, which we can still choose to ignore in tauri bundler and treat it as success

@Legend-Master
Copy link
Copy Markdown
Contributor Author

Changed to return 2 instead when nothing's found, also updated outdated documentations on missing parameter panic

@amrbashir amrbashir merged commit 4054c7b into tauri-apps:dev Nov 2, 2025
6 checks passed
@Legend-Master Legend-Master deleted the kill-process-no-processes branch November 3, 2025 02:26
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.

2 participants