[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: file-descriptor probs.

From: Joe Orton <joe_at_manyfish.co.uk>
Date: 2001-09-20 09:25:44 CEST

On Wed, Sep 19, 2001 at 05:40:48PM -0700, Greg Stein wrote:
...
> write(4,0x8111ae2,19) = 19 (0x13)
> lseek(4,0x0,0) = 0 (0x0)
> fstat(4,0xbfbff714) = 0 (0x0)
> socket(0x2,0x1,0x0) = 5 (0x5)
> connect(0x5,0xbfbff284,0x10) = 0 (0x0)
> write(5,0x8144800,206) = 206 (0xce)
> lseek(4,0x0,0) = 0 (0x0)
> read(0x4,0xbfbfeea4,0x400) ERR#9 'Bad file descriptor'
> write(5,0xbfbfeea4,-1) ERR#22 'Invalid argument'
>
> The first write() is putting the svndiff into the temp file. Then we rewind
> it. Neon fstat's it to get the size, opens the socket to the server, writes
> the header information, then rewinds the temp file. It then goes to read the
> file and blows up.
>
> The problem is that the read() returns EBADF, but there is no close(!)

Was the fd opened for reading as well as writing? read(2):

       EBADF fd is not a valid file descriptor or is not open
              for reading.

joe

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:42 2006

This is an archived mail posted to the Subversion Dev mailing list.