Mail Archives: djgpp/1996/12/05/12:25:21
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 -