Reading /proc/registry/... returns extra char

Nellis, Kenneth Kenneth.Nellis@acs-inc.com
Wed May 26 13:37:00 GMT 2010


> From: Corinna Vinschen
> Sent: Wednesday, May 26, 2010 07:48
> To: cygwin@cygwin.com
> Subject: Re: Reading /proc/registry/... returns extra char
> 
> On May 13 15:38, Nellis, Kenneth wrote:
> > > From: Dale Stimson
> > > Sent: Thursday, May 13, 2010 14:13
> > > To: cygwin@cygwin.com
> > > Subject: Reading /proc/registry/... returns extra char
> > >
> > > Reading a file under /proc/registry returns an extra character at
> the
> > > end,
> > > which appears to be the null character.
> > >
> > > This has happened for every registry entry that I have tried.  Here
> is
> > > one in particular:
> > > --------------------------------
> > > $ cat >a.dat
> > >
> /proc/registry/HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/Syst
> > > emBootDevice
> 
> This trailing NUL character was always there, already with Cygwin 1.5.
> It's part of the file content.  If strings are stored with a trailing
> NUL in a file, you don't want Cygwin to remove it for you, right?
> 
> > Not only that, but if you pipe that output to another process, you
> > (or should I say "I") get a stack dump:
> 
> I can't observe this when using CVS HEAD.
> 
> 
> Corinna
> 
> --
> Corinna Vinschen                  Please, send mails regarding Cygwin
> to
> Cygwin Project Co-Leader          cygwin AT cygwin DOT com
> Red Hat

"CVS HEAD"? Whatever; "head" is a red herring; the problem was 
reproducible by piping stdout of that registry reference to any 
process. I say "was" because I can't reproduce it now, although it 
was reliably reproducible then. (What's up with that?)
--Ken Nellis


More information about the Cygwin mailing list