Cloudef / bemenu

Dynamic menu library and client program inspired by dmenu
GNU General Public License v3.0
1.16k stars 90 forks source link

Fix fallback to xclip #365

Closed vain closed 7 months ago

vain commented 8 months ago

popen() returns NULL if the underlying fork() or pipe() fails, not if the called program didn't run properly. The old code didn't actually fall back to xclip on X11, it was never called.

To fix this, inspect the exit code of the programs that we run. We use the output of the first program that exited cleanly.

CC #363.

Cloudef commented 7 months ago

Thanks!