Package: xsel
Version: 0.9.6-1.1
I begin with the text "SELECTED\n" in the primary
selection buffer, then do the following sequence:
~/tmp$ xsel
SELECTED
~/tmp$ xsel &
[1] 16578
~/tmp$ SELECTED [I hit enter]
[1]+ Done xsel
~/tmp$ sh -c 'xsel' &
[1] 16611
~/tmp$ SELECTED [I hit enter]
[1]+ Done sh -c 'xsel'
~/tmp$ sh -c 'xsel &'
~/tmp$
~/tmp$ xsel
~/tmp$
Each command works as expected, except for sh -c 'xsel
&'. Instead of displaying the contents of the
selection buffer, the backgrounded xsel process clears
the selection buffer. This may seem minor in this
context, but it became a major bug in a script I was
using to monitor the selection buffer. Here is a
simplified example:
#!/bin/bash
while [ 1 ]
do
BUF=$(xsel)
echo "$BUF"
sleep 5s
done &
This script will output the contents of the selection
buffer once, but upon reading it in, xsel has also
cleared it (which it should not do). If the same
while loop is run from a terminal rather than from a
script file, the behavior is correct.
I'm using Debian testing, kernel 2.6.20.7, libc 2.6.1-1+b1.
____________________________________________________________________________________
Building a website is a piece of cake. Yahoo! Small Business gives you all the
tools to get online.
http://smallbusiness.yahoo.com/webhosting
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]