Better get the basics straight
Posted Mar 17, 2009 22:53 UTC (Tue) by
quotemstr (subscriber, #45331)
In reply to:
Better get the basics straight by butlerm
Parent article:
Better than POSIX?
POSIX has a mechanism to do precisely that:
SYNOPSIS
long fpathconf(int fildes, int name);
long pathconf(const char *path, int name);
DESCRIPTION
The fpathconf() and pathconf() functions shall determine the current value of a configurable limit or option (variable) that is associated with a file or directory.
I don't see a problem with adding platform-specific values for name: if an conscientious application asks for _LINUX_SAFE_RENAME on a system that doesn't even know it exists, pathconf will just return -1 and the application will say, "oh, okay. I need to use fsync."
If the POSIX people ever get around to standardizing safe semantics for rename, then Linux's pathconf can just support both the original and the standard name.
(
Log in to post comments)