ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/10/12/12:30:24

From: eplmst AT lu DOT erisoft DOT se (Martin Stromberg)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: zero file descriptors
Date: 12 Oct 2000 15:57:20 GMT
Organization: Ericsson Erisoft AB, Sweden
Lines: 18
Message-ID: <8s4n10$d55$1@antares.lu.erisoft.se>
References: <OF9C7EBCE2 DOT E6C2E8E5-ON85256976 DOT 005533DA AT COM>
NNTP-Posting-Host: lws256.lu.erisoft.se
X-Newsreader: TIN [version 1.2 PL2]
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Jeffrey_Krupp AT May-Co DOT com wrote:
: I am having a problem with fopen where it opens a file (returns a valid
: file pointer), but then its file handle is zero. When this happens, I can't
: fseek,fread,or fwrite. The same is true for a socket() call.

No wonder as this is what fopen() returns when the call fails (NULL)!

: As a work-around after the original fopen, I have been re-opening the same
: file, getting an actual valid handle/pointer, then closing the original
: pointer(the one with the zero handle).

If those two fopen() calls are identical it'd be very strange. Show us
some (complete compilable) code please.


Right,

						MartinS

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019