YaLTeR / wl-clipboard-rs

A safe Rust crate for working with the Wayland clipboard.
Apache License 2.0
223 stars 16 forks source link

wl-copy: Redirect stdio to /dev/null in foreground mode too #38

Closed eNV25 closed 10 months ago

eNV25 commented 10 months ago

This is a workaround for https://sw.kovidgoyal.net/kitty/. By default kitty waits until all processes connected by stdio die, before closing.

The current code already redirects stdio to /dev/null in background mode. This change makes it work in foreground mode too.

YaLTeR commented 10 months ago

But if wl-copy is in the foreground, then it's intentional that it's blocked, isn't it? As far as I can tell, wl-clipboard also only redirects the standard fds in background mode: https://github.com/bugaevc/wl-clipboard/blob/abfd513ecceef5f33632e0f63daea92f9bbe08e2/src/wl-copy.c#L54