mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-05-09 08:26:00 +02:00
[PR #1710] Fix --wait-pid for processes owned by other users #1700
Labels
No labels
ai-generated
android-app
android-app
android-app
🪲 bug
build
build
dependencies
docs
enhancement
enhancement
🔥 HOT
in-progress 🏃
ios
prio:low
prio:low
pull-request
question
🔒 security
server
server
unified-push
web-app
website
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ntfy#1700
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/binwiederhier/ntfy/pull/1710
Author: @bekoeppel
Created: 4/20/2026
Status: 🔄 Open
Base:
main← Head:fix/wait-pid-eperm-and-pidof-docs📝 Commits (1)
a0eb169Fix --wait-pid false-negative for cross-user processes and pidof docs📊 Changes
2 files changed (+9 additions, -3 deletions)
View changed files
📝
cmd/publish_unix.go(+8 -2)📝
docs/subscribe/cli.md(+1 -1)📄 Description
Two small fixes around
ntfy pub --wait-pid.1.
processExiststreats EPERM as "gone" (cmd/publish_unix.go)kill(pid, 0)returnsnilon success,ESRCHif the PID doesn'texist, and
EPERMif it exists but the caller can't signal it. Thecurrent code treats any error as "doesn't exist", so
--wait-pidexits immediately when the target process belongs to another user.
Repro (before): as a regular user, against a root-owned process:
After the fix,
--wait-pidcorrectly blocks until the process exits.Real-world case:
ntfyrunning as a regular user waiting on aroot-owned
resticbackup.2.
pidofexample uses-s(docs/subscribe/cli.md)pidof rsyncreturns space-separated PIDs when multiple processesmatch, which breaks
--wait-pid's single-integer argument.pidof -s(single-shot) returns just one.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.