www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/12/05/12:25:21

Message-Id: <9E6C083001E72A00@iris.ernet.in>
Date: 05 Dec 96 21:34 IST
From: tehmul%NIITPUN AT iris DOT ernet DOT in
Sender: tehmul%niitpun AT iris DOT ernet DOT in
To: djgpp AT delorie DOT com
Subject: RE:v2 funnies
Mime-Version: 1.0

                              
A. Appleyard wrote:
>If I call open("filename",mode) with two args to create a new file and write
>to it, even if I use mode O_RDWR, the file is created with its DOS readonly
>attribute set so it can't be altered or deleted afterwards (unless I state
>the permission required, as open("filename",mode,S_IWUSR)). This is
>unexpected and annoying, and did not happen in v1. Why is this?


I thought that ANSI behaviour specifies that whenever you create a file, the
third parameter to open (the permission) is _mandatory_, not optional.  So
not giving the third parameter while creating the file might be a mistake in
the first place. (Correct me if I'm wrong guys, I haven't looked at any ref
manual for a loong time.)

Ciao,
TG

- Raw text -


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