delorie.com/djgpp/bugs/show.cgi | search |
If you call open without the third argument (permissions) it sometimes creates a file which is read-only. This is because of a bug in src\libc\posixcntl\open.c at line 38. It doesn't check if you use a third argument, instead it uses what happens to be on the stack.
A C-function cannot check how many arguments it was passed. Therefore, if a file may be created you must supply the mode parameter.
webmaster | delorie software privacy |
Copyright © 2010 by DJ Delorie | Updated Jul 2010 |