www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/02/03/08:04:42

Sender: vheyndri AT rug DOT ac DOT be
Message-Id: <34D6F88B.259A@rug.ac.be>
Date: Tue, 03 Feb 1998 11:59:23 +0100
From: Vik Heyndrickx <Vik DOT Heyndrickx AT rug DOT ac DOT be>
Mime-Version: 1.0
To: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT gov DOT ar>
Cc: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>, djgpp-workers AT delorie DOT com
Subject: Re: fopen and shared files question
References: <m0xyHnZ-000S2dC AT inti DOT gov DOT ar> <m0xzHm5-000S4NC AT inti DOT gov DOT ar>

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 ...

The INT21h functions behave all sensibly on my machine (W95OSR2):
A file ***SUCCESSFULLY*** opened for reading can always be read from.
A file ***SUCCESSFULLY*** opened for writing can always be written to.
A file ***SUCCESSFULLY*** opened for reading/writing can always be read
from and written to,
no matter what sharing mode that has been used to open the file.
It may be time to suspect the libc routines.
I would like to see a small C code sample which fails a read after a
***successful*** open.

-- 
 \ Vik /-_-_-_-_-_-_/   
  \___/ Heyndrickx /          
   \ /-_-_-_-_-_-_/

- Raw text -


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