{"id":7286,"date":"2022-12-20T19:37:36","date_gmt":"2022-12-20T22:37:36","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/fpathconf-man3\/"},"modified":"2022-12-20T19:37:36","modified_gmt":"2022-12-20T22:37:36","slug":"fpathconf-man3","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/fpathconf-man3\/","title":{"rendered":"FPATHCONF (man3)"},"content":{"rendered":"<h1 align=\"center\">FPATHCONF<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#RETURN VALUE\">RETURN VALUE<\/a><br \/> <a href=\"#ERRORS\">ERRORS<\/a><br \/> <a href=\"#ATTRIBUTES\">ATTRIBUTES<\/a><br \/> <a href=\"#CONFORMING TO\">CONFORMING TO<\/a><br \/> <a href=\"#NOTES\">NOTES<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#COLOPHON\">COLOPHON<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">fpathconf, pathconf \u2212 get configuration values for files<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>#include <unistd.h><\/b><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>long fpathconf(int<\/b> <i>fd<\/i><b>, int<\/b> <i>name<\/i><b>); <br \/> long pathconf(const char *<\/b><i>path<\/i><b>, int<\/b> <i>name<\/i><b>);<\/b><\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>fpathconf<\/b>() gets a value for the configuration option <i>name<\/i> for the open file descriptor <i>fd<\/i>.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>pathconf<\/b>() gets a value for configuration option <i>name<\/i> for the filename <i>path<\/i>.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The corresponding macros defined in <i><unistd.h><\/i> are minimum values; if an application wants to take advantage of values which may change, a call to <b>fpathconf<\/b>() or <b>pathconf<\/b>() can be made, which may yield more liberal results.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Setting <i>name<\/i> equal to one of the following constants returns the following configuration options: <b><br \/> _PC_LINK_MAX<\/b><\/p>\n<p style=\"margin-left:22%;\">The maximum number of links to the file. If <i>fd<\/i> or <i>path<\/i> refer to a directory, then the value applies to the whole directory. The corresponding macro is <b>_POSIX_LINK_MAX<\/b>.<\/p>\n<p style=\"margin-left:11%;\"><b>_PC_MAX_CANON<\/b><\/p>\n<p style=\"margin-left:22%;\">The maximum length of a formatted input line, where <i>fd<\/i> or <i>path<\/i> must refer to a terminal. The corresponding macro is <b>_POSIX_MAX_CANON<\/b>.<\/p>\n<p style=\"margin-left:11%;\"><b>_PC_MAX_INPUT<\/b><\/p>\n<p style=\"margin-left:22%;\">The maximum length of an input line, where <i>fd<\/i> or <i>path<\/i> must refer to a terminal. The corresponding macro is <b>_POSIX_MAX_INPUT<\/b>.<\/p>\n<p style=\"margin-left:11%;\"><b>_PC_NAME_MAX<\/b><\/p>\n<p style=\"margin-left:22%;\">The maximum length of a filename in the directory <i>path<\/i> or <i>fd<\/i> that the process is allowed to create. The corresponding macro is <b>_POSIX_NAME_MAX<\/b>.<\/p>\n<p style=\"margin-left:11%;\"><b>_PC_PATH_MAX<\/b><\/p>\n<p style=\"margin-left:22%;\">The maximum length of a relative pathname when <i>path<\/i> or <i>fd<\/i> is the current working directory. The corresponding macro is <b>_POSIX_PATH_MAX<\/b>.<\/p>\n<p style=\"margin-left:11%;\"><b>_PC_PIPE_BUF<\/b><\/p>\n<p style=\"margin-left:22%;\">The maximum number of bytes that can be written atomically to a pipe of FIFO. For <b>fpathconf<\/b>(), <i>fd<\/i> should refer to a pipe or FIFO. For <b>fpathconf<\/b>(), <i>path<\/i> should refer to a FIFO or a directory; in the latter case, the returned value corresponds to FIFOs created in that directory. The corresponding macro is <b>_POSIX_PIPE_BUF<\/b>.<\/p>\n<p style=\"margin-left:11%;\"><b>_PC_CHOWN_RESTRICTED<\/b><\/p>\n<p style=\"margin-left:22%;\">This returns a positive value if the use of <b>chown<\/b>(2) and <b>fchown<\/b>(2) for changing a file\u2019s user ID is restricted to a process with appropriate privileges, and changing a file\u2019s group ID to a value other than the process\u2019s effective group ID or one of its supplementary group IDs is restricted to a process with appropriate privileges. According to POSIX.1, this variable shall always be defined with a value other than \u22121. The corresponding macro is <b>_POSIX_CHOWN_RESTRICTED<\/b>.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">If <i>fd<\/i> or <i>path<\/i> refers to a directory, then the return value applies to all files in that directory.<\/p>\n<p style=\"margin-left:11%;\"><b>_PC_NO_TRUNC<\/b><\/p>\n<p style=\"margin-left:22%;\">This returns nonzero if accessing filenames longer than <b>_POSIX_NAME_MAX<\/b> generates an error. The corresponding macro is <b>_POSIX_NO_TRUNC<\/b>.<\/p>\n<p style=\"margin-left:11%;\"><b>_PC_VDISABLE<\/b><\/p>\n<p style=\"margin-left:22%;\">This returns nonzero if special character processing can be disabled, where <i>fd<\/i> or <i>path<\/i> must refer to a terminal.<\/p>\n<h2>RETURN VALUE <a name=\"RETURN VALUE\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The return value of these functions is one of the following:<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>*<\/p>\n<\/td>\n<td width=\"3%\"><\/td>\n<td width=\"85%\">\n<p>On error, \u22121 is returned and <i>errno<\/i> is set to indicate the cause of the error (for example, <b>EINVAL<\/b>, indicating that <i>name<\/i> is invalid).<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>*<\/p>\n<\/td>\n<td width=\"3%\"><\/td>\n<td width=\"85%\">\n<p>If <i>name<\/i> corresponds to a maximum or minimum limit, and that limit is indeterminate, \u22121 is returned and <i>errno<\/i> is not changed. (To distinguish an indeterminate limit from an error, set <i>errno<\/i> to zero before the call, and then check whether <i>errno<\/i> is nonzero when \u22121 is returned.)<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>*<\/p>\n<\/td>\n<td width=\"3%\"><\/td>\n<td width=\"85%\">\n<p>If <i>name<\/i> corresponds to an option, a positive value is returned if the option is supported, and \u22121 is returned if the option is not supported.<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>*<\/p>\n<\/td>\n<td width=\"3%\"><\/td>\n<td width=\"85%\">\n<p>Otherwise, the current value of the option or limit is returned. This value will not be more restrictive than the corresponding value that was described to the application in <i><unistd.h><\/i> or <i><limits.h><\/i> when the application was compiled.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<h2>ERRORS <a name=\"ERRORS\"><\/a> <\/h2>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"9%\">\n<p style=\"margin-top: 1em\"><b>EACCES<\/b><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"78%\">\n<p style=\"margin-top: 1em\">(<b>pathconf<\/b>()) Search permission is denied for one of the directories in the path prefix of <i>path<\/i>.<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"9%\">\n<p><b>EBADF<\/b><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"78%\">\n<p>(<b>fpathconf<\/b>()) <i>fd<\/i> is not a valid file descriptor.<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"9%\">\n<p><b>EINVAL<\/b><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"78%\">\n<p><i>name<\/i> is invalid.<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"9%\">\n<p><b>EINVAL<\/b><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"78%\">\n<p>The implementation does not support an association of <i>name<\/i> with the specified file.<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"9%\">\n<p><b>ELOOP<\/b><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"78%\">\n<p>(<b>pathconf<\/b>()) Too many symbolic links were encountered while resolving <i>path<\/i>.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%;\"><b>ENAMETOOLONG<\/b><\/p>\n<p style=\"margin-left:22%;\">(<b>pathconf<\/b>()) <i>path<\/i> is too long.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"9%\">\n<p><b>ENOENT<\/b><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"78%\">\n<p>(<b>pathconf<\/b>()) A component of <i>path<\/i> does not exist, or <i>path<\/i> is an empty string.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%;\"><b>ENOTDIR<\/b><\/p>\n<p style=\"margin-left:22%;\">(<b>pathconf<\/b>()) A component used as a directory in <i>path<\/i> is not in fact a directory.<\/p>\n<h2>ATTRIBUTES <a name=\"ATTRIBUTES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">For an explanation of the terms used in this section, see <b>attributes<\/b>(7).<\/p>\n<p align=\"center\" style=\"margin-top: 1em\"><img decoding=\"async\" src=\"grohtml-1640971.png\" alt=\"Image grohtml-1640971.png\"><\/p>\n<h2>CONFORMING TO <a name=\"CONFORMING TO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">POSIX.1-2001, POSIX.1-2008.<\/p>\n<h2>NOTES <a name=\"NOTES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Files with name lengths longer than the value returned for <i>name<\/i> equal to <b>_PC_NAME_MAX<\/b> may exist in the given directory.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Some returned values may be huge; they are not suitable for allocating memory.<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>getconf<\/b>(1), <b>open<\/b>(2), <b>statfs<\/b>(2), <b>confstr<\/b>(3), <b>sysconf<\/b>(3)<\/p>\n<h2>COLOPHON <a name=\"COLOPHON\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This page is part of release 5.10 of the Linux <i>man-pages<\/i> project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https:\/\/www.kernel.org\/doc\/man\u2212pages\/.<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  fpathconf, pathconf \u2212 get configuration values for files <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2536],"tags":[2538,1805,3007],"class_list":["post-7286","post","type-post","status-publish","format-standard","hentry","category-3-llamadas-de-bibliotecas","tag-2538","tag-fpathconf","tag-man3"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/7286","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=7286"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/7286\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=7286"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=7286"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=7286"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}