This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch for reliable rcs on win95

Jim I think it's fast_copy in rcsutil, that exibits this behavior in rcs,
ignoring the size of the returned read. under linux you either get what you
asked for, EOF or an error, and some programs count on this behavior
including rcs.

To see an example do ci -u filename
rcs -U filename
make some changes to the file
export strace=1,strace.log
and use rcs configured as default (without large_memory) to do
ci -u filename
when you read through the strace.log file, you should see something like

read (3, 0x4683004, 1024)
1024=read(3, 0x4683004, 1024)
write (4, 0x4683004, 1024)
1024 = write(4, 0x4683004, 1024)
read (3, 0x4683004, 1024)
921 = read(3, 0x4683004, 1024)  << short read
write (4, 0x4683004, 1024)  << ignored

This will give you a truncated RCS/filename,v
Out of the 20 plus files in the winsup directory 2 did this consistently

It dosen't happen all the time, and maybe it's just my system, but based on
Ron says (following) I don't think so.

One thing I have seen: file i/o does not always works as it does on unix. 
For example, reading from a file, 1024 bytes at a time, with a file of 
65536 bytes, will get me return values of:
1023, 1021, 1015, etc. Almost always 1024, but enough of these oddballs 
to cause trouble for programs that don't carefully check return values 
from read() (there are some of these ...). I had to fix the rtsp ref. 
port from realaudio to accomodate this strange read(2) behavior.


Ron Minnich                |"Failure is not an option" -- Gene Kranz       | -- except, of course, on Microsoft products
(609)-734-3120             | 

I was kind of tired last night, so I forgot to insert the diff, and since I
don't see my second message this morning I'll include it here again. (sorry
if you got it twice).

> Mikey wrote:
> > The win95 short read bug also affects rcs ci co & company (at least for
> > me).
> Hi.  What bug is this?  Is it written up somewhere?  Thanks.
> > cd into the rcs-5.7/src directory and apply the included dif.
> Um, what included dif?  There wasn't one with the message I received.
> --
> <J Q B>

conf_sh.dif (DIF File)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]