delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/02/02/14:00:05

Date: Mon, 2 Feb 1998 19:57:09 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT gov DOT ar>
cc: djgpp-workers AT delorie DOT com
Subject: Re: fopen and shared files question
In-Reply-To: <m0xzHm5-000S4NC@inti.gov.ar>
Message-ID: <Pine.SUN.3.91.980202195213.19322e-100000@is>
MIME-Version: 1.0

On Mon, 2 Feb 1998, Salvador Eduardo Tropea (SET) wrote:

> Is the read call the one that fails! seems to be related to SHARE.EXE. You can 
> open the file, but you can't read from it, even when both programs opened for 
> read. Only the first can read, the second gets something like Error 26 bad ...

That figures.  The question is how to correct this.  The main problem is 
that the library doesn't have any clue what will you do with the file 
after you open it.  If you open for read-only, the answer is clear, but 
if not...

> > According to the Interrupt List, this strategy will fail the open call
> > in the second program in more cases than the current setup.  So it is
> > actually worse than the current situation.
> The code that I posted WORKS.

I didn't doubt that.  I just wanted to point out that using this will 
fail more cases of different open options, and I don't see any easy way 
out of this mess which will keep more people happy.

> The code I posted fixes the problem, two copies of the editor can open the help 
> files and read the help files.

I think this will only work for opening files in read-only mode.  If you
could suggest a solution that works in the case of read-only open without
doing any harm to the other cases, then I think it is a good idea to add
this to the library. 

- Raw text -


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