Skip to content

fix: isolate background clipboard process group - #299

Open
ryjen wants to merge 1 commit into
bugaevc:masterfrom
ryjen:agent/job-control
Open

ryjen wants to merge 1 commit into
bugaevc:masterfrom
ryjen:agent/job-control

Conversation

@ryjen

@ryjen ryjen commented Aug 13, 2026

Copy link
Copy Markdown

Fixes #298

wl-copy forks to keep serving clipboard requests, but the serving child
remains in the caller's process group. Suspending a foreground terminal job
with Ctrl-Z therefore suspends the clipboard provider as well.

Put the child in its own process group from the parent before the parent
exits. This keeps it in the same session while preventing foreground
job-control signals from stopping it.

Tested with Ubuntu 24.04 and headless Sway/wlroots:

  • baseline: provider PGID matches the foreground PGID and enters T after
    Ctrl-Z; paste does not complete
  • patched: provider gets a separate PGID in the same SID, remains S after
    Ctrl-Z, and wl-paste returns the copied text

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.

Background wl-copy inherits caller's process group and is suspended by terminal job control

1 participant