You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
The file handling functions from fd.c were called with a diverse mix ofnotations for the file permissions when they were opening new files.Almost all files created by the server should have the same permissionsset. So change the API so that e.g. OpenTransientFile() automaticallyuses the standard permissions set, and OpenTransientFilePerm() is a newfunction that takes an explicit permissions set for the few cases whereit is needed. This also saves an unnecessary argument for call sitesthat are just opening an existing file.While we're reviewing these APIs, get rid of the FileName typedef anduse the standard const char * for the file name and mode_t for the filemode. This makes these functions match other file handling functionsand removes an unnecessary layer of mysteriousness. We can also get ridof a few casts that way.Author: David Steele <david@pgmasters.net>