public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Cygwin 1.7.13 regression: Inheritance of /dev/clipboard filedesc fails
@ 2012-04-06 19:15 Christian Franke
  2012-04-06 19:41 ` Christopher Faylor
  0 siblings, 1 reply; 11+ messages in thread
From: Christian Franke @ 2012-04-06 19:15 UTC (permalink / raw)
  To: cygwin

The inheritance of a /dev/clipboard filedesc through fork() fails in 
1.7.13. Last working snapshot was 2012-03-30.

Access to /dev/clipboard itself works as expected.

Testcase:

$ uname -vrs
CYGWIN_NT-6.1-WOW64 1.7.12s(0.260/5/3) 20120330 12:20:36

$ echo test1 | cat > /dev/clipboard

$ cat < /dev/clipboard
test1


$ uname -vrs
CYGWIN_NT-6.1-WOW64 1.7.13(0.260/5/3) 2012-04-05 12:43

$ echo test2 | cat > /dev/clipboard
cat: standard output: Bad file descriptor

$ cat < /dev/clipboard
cat: failed to reopen `stdin' with mode `rb': Bad file descriptor

$ cat /dev/clipboard
test1

$ echo test3 > /dev/clipboard

$ cat /dev/clipboard
test3

Christian


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Cygwin 1.7.13 regression: Inheritance of /dev/clipboard filedesc fails
  2012-04-06 19:15 Cygwin 1.7.13 regression: Inheritance of /dev/clipboard filedesc fails Christian Franke
@ 2012-04-06 19:41 ` Christopher Faylor
  2012-04-06 19:58   ` Christian Franke
  0 siblings, 1 reply; 11+ messages in thread
From: Christopher Faylor @ 2012-04-06 19:41 UTC (permalink / raw)
  To: cygwin

On Fri, Apr 06, 2012 at 09:15:13PM +0200, Christian Franke wrote:
>The inheritance of a /dev/clipboard filedesc through fork() fails in 
>1.7.13. Last working snapshot was 2012-03-30.

Should be fixed in the next snapshot.

http://cygwin.com/snapshots/

cgf

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Cygwin 1.7.13 regression: Inheritance of /dev/clipboard filedesc fails
  2012-04-06 19:41 ` Christopher Faylor
@ 2012-04-06 19:58   ` Christian Franke
  2012-04-06 20:07     ` Nellis, Kenneth
  2012-04-17 21:20     ` Michael Vance
  0 siblings, 2 replies; 11+ messages in thread
From: Christian Franke @ 2012-04-06 19:58 UTC (permalink / raw)
  To: cygwin

Christopher Faylor wrote:
> On Fri, Apr 06, 2012 at 09:15:13PM +0200, Christian Franke wrote:
>> The inheritance of a /dev/clipboard filedesc through fork() fails in
>> 1.7.13. Last working snapshot was 2012-03-30.
> Should be fixed in the next snapshot.
>
> http://cygwin.com/snapshots/
>

Confirmed :-)

Thanks,
Christian


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: Cygwin 1.7.13 regression: Inheritance of /dev/clipboard filedesc fails
  2012-04-06 19:58   ` Christian Franke
@ 2012-04-06 20:07     ` Nellis, Kenneth
  2012-04-06 20:45       ` Christian Franke
  2012-04-17 21:20     ` Michael Vance
  1 sibling, 1 reply; 11+ messages in thread
From: Nellis, Kenneth @ 2012-04-06 20:07 UTC (permalink / raw)
  To: cygwin

From: Christian Franke

> Confirmed :-)

Yes, but...

$ uname -vrs
CYGWIN_NT-5.1 1.7.14s(0.260/5/3) 20120406 19:41:34
$ echo test1 | cat > /dev/clipboard
$ cat < /dev/clipboard
test1
$ getclip
4▒test1
\bB+inI$x$Objects\Common\3.5\bin\NOTES;C:\Program Files\Business Objects\Common\3.5\bin\NOTES\DATA;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Intel\DMIX;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\NTRU Cryptosystems\NTRU TCG Software Stack\bin;C:\Program Files\Wave Systems Corp\Gemalto\Access Client\v5;C:\Program Files\Common Files\Roxio Shared\DLLShared;C:\Program Files\Common Files\Roxio Shared\9.0\DLLShared;C:\Program Files\Microsoft SQL Server\90\Tools\binn;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Program Files\IBM\RationalSDLC\ClearCase\bin;C:\Program Files\IBM\RationalSDLC\common;D:\cyghome\knellis\scripts\acs;D:\cyghome\knellis\scripts;D:\cyghome\knellis\bin\i686;C:\Program Files\Microsoft Office\Office12 Fg▒es▒$▒$mon Files\Roxio Shared\DLLShared;C:\Program Files\Common Files\Roxio Shared\9.0\DLLShared;C:\Program Files\Microsoft SQL Server\90\Tools\binn;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Program Files\IBM\RationalSDLC\ClearCase\bin;C:\Program Files\IBM\RationalSDLC\common;D:\cyghome\knellis\scripts\acs;D:\cyghome\knellis\scripts;D:\cyghome\knellis\bin\i686;C:\Program Files\Microsoft Office\Office12+▒$▒$▒?$A$8B$XC$xD$▒E$▒F$▒G$▒▒▒▒ ▒|▒▒▒▒▒▒▒▒@▒|▒▒▒▒▒▒▒▒`▒|▒▒▒▒▒▒▒▒▒▒|▒▒▒▒▒▒▒▒▒▒|▒▒▒▒▒▒▒▒▒▒|▒▒▒▒▒▒▒▒▒▒|▒▒▒▒▒▒▒▒▒|▒▒▒▒▒&▒
Segmentation fault (core dumped)
$

--Ken Nellis

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Cygwin 1.7.13 regression: Inheritance of /dev/clipboard filedesc fails
  2012-04-06 20:07     ` Nellis, Kenneth
@ 2012-04-06 20:45       ` Christian Franke
  2012-04-07  4:19         ` Charles Wilson
  2012-04-07 15:05         ` Andrey Repin
  0 siblings, 2 replies; 11+ messages in thread
From: Christian Franke @ 2012-04-06 20:45 UTC (permalink / raw)
  To: cygwin

Nellis, Kenneth wrote:
> From: Christian Franke
>
>> Confirmed :-)
> Yes, but...
>
> $ uname -vrs
> CYGWIN_NT-5.1 1.7.14s(0.260/5/3) 20120406 19:41:34
> $ echo test1 | cat>  /dev/clipboard
> $ cat<  /dev/clipboard
> test1
> $ getclip
> [Garbage]test[Garbage]
> ...
> Segmentation fault (core dumped)

This is unrelated. Apparently getclip is no longer compatible with 
current cygwin. The cygwin native clipboard format has changed. New 
format starts with a timestamp which is interpreted as data size by getclip.

BTW: I would suggest to start CYGWIN_NATIVE_CLIPBOARD format with a 
version number that can be checked by external programs.

Christian


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Cygwin 1.7.13 regression: Inheritance of /dev/clipboard filedesc fails
  2012-04-06 20:45       ` Christian Franke
@ 2012-04-07  4:19         ` Charles Wilson
  2012-04-08 10:19           ` Denis Excoffier
  2012-04-07 15:05         ` Andrey Repin
  1 sibling, 1 reply; 11+ messages in thread
From: Charles Wilson @ 2012-04-07  4:19 UTC (permalink / raw)
  To: cygwin

On 4/6/2012 4:44 PM, Christian Franke wrote:
> This is unrelated. Apparently getclip is no longer compatible with
> current cygwin. The cygwin native clipboard format has changed. New
> format starts with a timestamp which is interpreted as data size by
> getclip.

Ah, I missed that change:

2012-03-26  Corinna Vinschen  <...>

* fhandler.h (class fhandler_dev_clipboard): Add fstat method.
* fhandler_clipboard.cc (cygcb_t): New type for Cygwin-specific
clipboard format.
(set_clipboard): Use new clipboard format to allow setting a timestamp.
(fhandler_dev_clipboard::fstat): New method.  Read modification and
access timestamp as well as length from clipboard data.
(fhandler_dev_clipboard::read): Use new clipboard format.

I'll try to get an update out after Easter (incl. some other pending 
cygutils changes).  Although CYGWIN_NATIVE_CLIPBOARD version # would be 
cleaner, it isn't really needed.  Since getclip is a cygwin program, and 
we already know that all interacting cygwin processes must be using the 
same cygwin dll, it's easy enough for getclip.exe to check the running 
cygwin's version and act appropriately -- given knowledge of when the 
clipboard format was changed.

--
Chuck

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Cygwin 1.7.13 regression: Inheritance of /dev/clipboard filedesc fails
  2012-04-06 20:45       ` Christian Franke
  2012-04-07  4:19         ` Charles Wilson
@ 2012-04-07 15:05         ` Andrey Repin
  1 sibling, 0 replies; 11+ messages in thread
From: Andrey Repin @ 2012-04-07 15:05 UTC (permalink / raw)
  To: Christian Franke, cygwin

Greetings, Christian Franke!

>>> Confirmed :-)
>> Yes, but...
>>
>> $ uname -vrs
>> CYGWIN_NT-5.1 1.7.14s(0.260/5/3) 20120406 19:41:34
>> $ echo test1 | cat>  /dev/clipboard
>> $ cat<  /dev/clipboard
>> test1
>> $ getclip
>> [Garbage]test[Garbage]
>> ...
>> Segmentation fault (core dumped)

> This is unrelated.

Unrelated, but notable.
It's worth checking if redirecting to /dev/clipboard actually clear the clipboard
before writing to it.
We've seen enough of it, when some application fills (f.e.) "text in unicode",
but leaves "text in ANSI" unchanged/undefined/in result - garbage.

> Apparently getclip is no longer compatible with current cygwin. The cygwin
> native clipboard format has changed. New format starts with a timestamp
> which is interpreted as data size by getclip. 


--
WBR,
Andrey Repin (anrdaemon@freemail.ru) 07.04.2012, <18:54>

Sorry for my terrible english...


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Cygwin 1.7.13 regression: Inheritance of /dev/clipboard filedesc fails
  2012-04-07  4:19         ` Charles Wilson
@ 2012-04-08 10:19           ` Denis Excoffier
  0 siblings, 0 replies; 11+ messages in thread
From: Denis Excoffier @ 2012-04-08 10:19 UTC (permalink / raw)
  To: cygwin

Hello,

On 2012-04-07 06:18, Charles Wilson wrote:

> I'll try to get an update out after Easter (incl. some other pending cygutils changes).

Please consider also http://sourceware.org/ml/cygwin/2010-05/msg00075.html,
rather old but still valid.


Regards,

Denis Excoffier.

P.S. Check typo "utilties" in the cygport file.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Cygwin 1.7.13 regression: Inheritance of /dev/clipboard filedesc fails
  2012-04-06 19:58   ` Christian Franke
  2012-04-06 20:07     ` Nellis, Kenneth
@ 2012-04-17 21:20     ` Michael Vance
  2012-04-18  6:16       ` Inheritance of /dev/urandom " Christopher Faylor
  1 sibling, 1 reply; 11+ messages in thread
From: Michael Vance @ 2012-04-17 21:20 UTC (permalink / raw)
  To: cygwin

Christian Franke <Christian.Franke <at> t-online.de> writes:

> 
> Christopher Faylor wrote:
> > On Fri, Apr 06, 2012 at 09:15:13PM +0200, Christian Franke wrote:
> >> The inheritance of a /dev/clipboard filedesc through fork() fails in
> >> 1.7.13. Last working snapshot was 2012-03-30.
> > Should be fixed in the next snapshot.
> >
> > http://cygwin.com/snapshots/
> >
> 
> Confirmed 
> 

Maybe not. I'm seeing a similar problem with /dev/urandom that still exists 
in latest snapshot. I don't have access to an older version to show when it 
worked, but it did. I've identified a workaround (shown) that works for my 
specific case, but thought you should still be aware of the problem:

user@machine ~
$ uname -vsr
CYGWIN_NT-6.1-WOW64 1.7.14s(0.260/5/3) 20120415 17:52:03

user@machine ~
$ RNDSTRING=$(</dev/urandom tr -dc [:print:] | head -c120)
tr: failed to reopen `stdin' with mode `rb': Bad file descriptor

user@machine ~
$ set | grep 'RNDSTRING'
RNDSTRING=

user@machine ~
$ RNDSTRING2=$(cat /dev/urandom | tr -dc [:print:] | head -c120)

user@machine ~
$ set | grep 'RNDSTRING'
RNDSTRING=
RNDSTRING2='dcOki9N2m0J(`NnxGC)uN$|hoq6C>&)^|bhq=ryo!2fIjSK@hKOPgEc<]lp*=y9@w
$RxgAc^an-6"H{,buf[^q+0!'\''FY#%+WoL;<q'\''Nu!5'\''B>9*76|xHgG00'

user@machine ~
$


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Inheritance of /dev/urandom filedesc fails
  2012-04-17 21:20     ` Michael Vance
@ 2012-04-18  6:16       ` Christopher Faylor
  2012-04-18 18:57         ` Michael Vance
  0 siblings, 1 reply; 11+ messages in thread
From: Christopher Faylor @ 2012-04-18  6:16 UTC (permalink / raw)
  To: cygwin

On Tue, Apr 17, 2012 at 09:16:06PM +0000, Michael Vance wrote:
>Christian Franke <Christian.Franke <at> t-online.de> writes:
>>Christopher Faylor wrote:
>>>On Fri, Apr 06, 2012 at 09:15:13PM +0200, Christian Franke wrote:
>>>>The inheritance of a /dev/clipboard filedesc through fork() fails in
>>>>1.7.13.  Last working snapshot was 2012-03-30.
>>>Should be fixed in the next snapshot.
>>>
>>>http://cygwin.com/snapshots/
>>>
>>
>>Confirmed
>
>Maybe not.  I'm seeing a similar problem with /dev/urandom that still
>exists in latest snapshot.

Should be fixed in today's snapshot.

cgf

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Inheritance of /dev/urandom filedesc fails
  2012-04-18  6:16       ` Inheritance of /dev/urandom " Christopher Faylor
@ 2012-04-18 18:57         ` Michael Vance
  0 siblings, 0 replies; 11+ messages in thread
From: Michael Vance @ 2012-04-18 18:57 UTC (permalink / raw)
  To: cygwin

Christopher Faylor <cgf-use-the-mailinglist-please <at> cygwin.com> writes:

> 
> On Tue, Apr 17, 2012 at 09:16:06PM +0000, Michael Vance wrote:
> >Christian Franke <Christian.Franke <at> t-online.de> writes:
> >>Christopher Faylor wrote:
> >>>On Fri, Apr 06, 2012 at 09:15:13PM +0200, Christian Franke wrote:
> >>>>The inheritance of a /dev/clipboard filedesc through fork() fails in
> >>>>1.7.13.  Last working snapshot was 2012-03-30.
> >>>Should be fixed in the next snapshot.
> >>>
> >>>http://cygwin.com/snapshots/
> >>>
> >>
> >>Confirmed
> >
> >Maybe not.  I'm seeing a similar problem with /dev/urandom that still
> >exists in latest snapshot.
> 
> Should be fixed in today's snapshot.
> 
> cgf

Confirmed. Thanks!

user@machine ~
$ uname -vsr
CYGWIN_NT-6.1-WOW64 1.7.14s(0.260/5/3) 20120418 05:58:18

user@machine ~
$ RNDSTRING=$(</dev/urandom tr -dc [:print:] | head -c120)

user@machine ~
$ set | grep 'RNDSTRING'
RNDSTRING='40vSp\#gH jUx[G-"gw*mH_{:/,\|JIGH*y+,-m0Z9OL6hP||%{zw(o
tGg]~R$N&T>3HZ?&K#0q+y  t^jd2!ykC<,NE=_#13/0/QWqV"1.EJ8hL`78TCi=;'


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-04-18 18:57 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-06 19:15 Cygwin 1.7.13 regression: Inheritance of /dev/clipboard filedesc fails Christian Franke
2012-04-06 19:41 ` Christopher Faylor
2012-04-06 19:58   ` Christian Franke
2012-04-06 20:07     ` Nellis, Kenneth
2012-04-06 20:45       ` Christian Franke
2012-04-07  4:19         ` Charles Wilson
2012-04-08 10:19           ` Denis Excoffier
2012-04-07 15:05         ` Andrey Repin
2012-04-17 21:20     ` Michael Vance
2012-04-18  6:16       ` Inheritance of /dev/urandom " Christopher Faylor
2012-04-18 18:57         ` Michael Vance

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).