Re: index-pack died on pread

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Thu, 26 Jul 2007, Alex Riesen wrote:
> > 
> > It's true that pread() is used much less than normal reads, and maybe the
> > cygwin pread() is indeed broken. But it's intriguing how apparently both
> > HP-UX and Cygwin are showing the same breakage.
> 
> Maybe because neither _has_ POSIX pread?

HP-UX? No pread()? It wouldn't link if it didn't have pread(). So it 
clearly has pread(), it's just somehow broken.

And no, git doesn't need "POSIX pread". Look at what git does if you say 
"NO_PREAD=1". It does a simple lseek/read pair instead.

> This is cygwin's pread, I believe:
> 
> http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/fhandler_disk_file.cc?rev=1.225&content-type=text/x-cvsweb-markup&cvsroot=src

I'm not saying that's great programming, but the "git_pread()" that git 
will use in the absense of a real pread() is actually even *less* of a 
POSIX pread, since it doesn't even try to save/restore the old position 
(it knows that git doesn't care).

So I don't think that explains why git doesn't like cygwin's pread. I 
suspect an earlier version of cygwin had an even more broken version of 
pread at some point.

		Linus
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux