Not closing stdout when setting clipboard from stdin
xclip has moved to GitHub
Status: Beta
Brought to you by:
astrand
xclip does not appear to be closing stdout. This was noticed to cause compatibility problems when used with newer versions of tmux.
The tmux developer was able to identify this as the cause of an issue originally reported against tmux.
More info: https://sourceforge.net/p/tmux/tickets/40/?limit=10&page=1#9a2b
See this StackOverflow question for an explanation of why xclip does not exit/close stdout until another selection is made:
http://stackoverflow.com/questions/19254114/xclip-does-not-terminate-when-tracing-it
Basically, it seems the only place the text buffer exists for other X clients to copy from is xclip itself, so if it exits the text goes with it. To stay alive, xclip fork's and daemonizes. I'm not sure how xsel handles this.
I guess maybe xclip could close stdout when it knows it has nothing else to write to it?