Patch for reliable rcs on win95

Mikey jeffdb@netzone.com
Tue Mar 18 08:25:00 GMT 1997


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
for me VERY ANNOYING!!

It dosen't happen all the time, and maybe it's just my system, but based on
what
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

Ron Minnich                |"Failure is not an option" -- Gene Kranz
rminnich@sarnoff.com       | -- except, of course, on Microsoft products
(609)-734-3120             |
ftp://ftp.sarnoff.com/pub/mnfs/www/docs/cluster.html 

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)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: conf_sh.dif
Type: text/x-diff
Size: 856 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/19970318/c61bfd02/attachment.bin>


More information about the Cygwin mailing list