www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/23/18:31:26

Date: Thu, 23 May 1996 18:25:18 -0400
From: dj (DJ Delorie)
Message-Id: <199605232225.SAA08438@delorie.com>
To: marcus AT sysc DOT pdx DOT edu
CC: eliz AT is DOT elta DOT co DOT il, djgpp AT delorie DOT com
In-reply-to: <199605231401.HAA06630@sayre.sysc.pdx.edu> (message from Marcus Daniels on Thu, 23 May 1996 07:01:12 -0700)
Subject: Re: EACCES on read

> If there is a pre-existing file, which you then try to overwrite
> using `creat', the first read from the file will return a -1 with
> errno==EACCESS, instead of a zero-length read.

If you open the file with creat(), you shouldn't be able to read from
it at all, because it's open only for writing.  I think EACCES is the
right response here.

- Raw text -


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