| www.delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
| :list-unsubscribe:list-subscribe:list-archive:list-post | |
| :list-help:sender:date:from:to:subject:message-id:reply-to | |
| :references:mime-version:content-type:in-reply-to; q=dns; s= | |
| default; b=w/ISyvmzzEj7U0ATEP3hvVo7MRmJXhAyYBc1RgCjTzJNCLgVYIrRq | |
| ZcQ7qOiVE8xVEO+RDAUoA+cjt/ly7uDTElAmzDjQjVxKFsyQIC8D1ZyIE16ld52L | |
| eHGZZhpTwonSVDtHzwH/xB7MVNs/AFkagIfjkH5eGp4ciV0arvCAkg= | |
| DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
| :list-unsubscribe:list-subscribe:list-archive:list-post | |
| :list-help:sender:date:from:to:subject:message-id:reply-to | |
| :references:mime-version:content-type:in-reply-to; s=default; | |
| bh=D0XwX3vn9RBae89V9LVcWHemhoY=; b=AAEF8YMO2cXYHCknuIu8NWgHN3hc | |
| xNQt17pR4pNlbTVuuhPgf2nvKkTGMqz5Hx7im5H2SmJaRTAJLkJvq6S1gpcb7/TC | |
| qv4wJcu43XRG/iWBdjBAceiGdpOc5Y1UY8ZUbBV7q3U/Z6ANjSKEZ0P5H4up+jio | |
| IeJp4KYCRrXe1R8= | |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| Authentication-Results: | sourceware.org; auth=none |
| X-Virus-Found: | No |
| X-Spam-SWARE-Status: | No, score=-5.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 |
| X-HELO: | calimero.vinschen.de |
| Date: | Fri, 13 Feb 2015 10:23:39 +0100 |
| From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
| To: | cygwin AT cygwin DOT com |
| Subject: | Re: Writing to /dev/clipboard from multiple processes in Bash gives inconsistent behaviour |
| Message-ID: | <20150213092339.GB17624@calimero.vinschen.de> |
| Reply-To: | cygwin AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| References: | <20150212134550 DOT GC20741 AT dinwoodie DOT org> <20150212170342 DOT GB7818 AT calimero DOT vinschen DOT de> <925263616 DOT 20150213005102 AT yandex DOT ru> |
| MIME-Version: | 1.0 |
| In-Reply-To: | <925263616.20150213005102@yandex.ru> |
| User-Agent: | Mutt/1.5.23 (2014-03-12) |
--u3/rZRmxL6MmkK24
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Feb 13 00:51, Andrey Repin wrote:
> Greetings, Corinna Vinschen!
>=20
> > On Feb 12 13:45, Adam Dinwoodie wrote:
> >> I've spotted some slightly odd behaviour when writing things from
> >> multiple processes to /dev/clipboard.
> >>=20
> >> Easiest to show this with an example:
> >>=20
> >> for n in {1..10}; do echo $n; done >/dev/clipboard; cat /dev/clipb=
oard
> >>=20
> >> I expect this to print out the numbers 1=E2=80=9310 to the terminal. =
Sometimes
> >> it does, but sometimes it misses out some of the numbers at the end;
> >> printing the digits 1=E2=80=938, say, but no more. Generally it gets =
to around
> >> 7=E2=80=939, but I've seen it managing to only get up to 3 on one occa=
sion.
>=20
> > I can't reproduce this. First I tried this manually a couple of times,
> > but then I created a loop:
>=20
> > for i in {1..1000}
> > do
> > echo > /dev/clipboard
> > for n in {1..10}; do echo $n; done > /dev/clipboard
> > grep -q 10 /dev/clipboard || cat /dev/clipboard
> > done
>=20
> > and it didn't fail once. I'm not sure what to do if I don't have a
> > reproducible testcase...
>=20
> Failed ~20 times for me. And the more, the more I run the test.
> What is more curious, is if I modify your test to only print "1",
>=20
> while true; do
> echo > /dev/clipboard
> for n in {1..10}; do echo $n; done > /dev/clipboard
> grep -q 10 /dev/clipboard || grep 1 /dev/clipboard
> done
>=20
> it sporadically print 10 !
> And my mail client actively flashing "paste" buttons, when the script is
> working in background. May be that's it.
>=20
> This is more visible:
> $ while true; do { i=3D$(( $i+1 )); echo > /dev/clipboard; for n in {1..1=
0}; do echo $n; done > /dev/clipboard; grep -q 10 /dev/clipboard || { grep =
10 /dev/clipboard && echo $i;};}; done;
Nope, no way. I'm running this latter test for 45 minutes now, with
no output.
Corinna
--=20
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
--u3/rZRmxL6MmkK24
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBAgAGBQJU3cKbAAoJEPU2Bp2uRE+gblgP/14a1qNOUNgGSnTqb9tIQGyb
sECOVTjErYWa/RoUvPgN6lfFSC8GYYEfEAKlCo/8ERYrBc3aDA2VA0oz/Uvp60HN
owLQOVouq24cTVWXOmM3VCH5bEGtXERfxg6cCfA6dTxS85PFUHQg79nEipGLn12e
HB/v8/NmzPIQBXD6kxfgPVaH5Z9VWDAXcR5nV+CW7P/IEMYymUCjPDWafJulyZMM
luPRTxPdVyLfaMY3nWn8xOZJNCzJpvXDG2nTpNbH+8MFAKIrtIaBWrG0AqWCSiaX
dY1jFSqsMIvuTadwH5QUIU2Qz8XJgJae7CmhxuDoufK3cHIfljWoqF09C9bvsYGd
SfqU2CQs2+ZQhijXeZb7CTDLNH1giqf51AQEsum6G1Ksa2uZo5XdqKmi1XTjxjav
bFWJxmGKB7ObEdbMt5BT/5ejWkkWgkef26DdiZmr7mykBPLz1d+o5EHjenm6cvTr
KtGbVehUgwlwjgz4wluEQWwy5aKT+6+uYLY0LtDwNPNEp4ag9ipTG9MqrmWlFwYn
KrWi8mqJDXaYzFWUS7m6OHJwOQSmv9xqrI2QEUYnIB7f5lWEJEGil6jDl+ByE2/a
Z0N0C9xjbo47+14fL1+ai3u4aH5/dZRd3+S/rFCZbIYmu6/E1/PA7M8lcH7bsuIs
mnBqKOG2I12TBP1siFTh
=Fcv5
-----END PGP SIGNATURE-----
--u3/rZRmxL6MmkK24--
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |