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 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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