获得运行时限制函数
#include <unistd.h>
long sysconf(int name);
long pathconf(const char *pathname,int name);
long fpathconf(int fd,int name);
(1)如果name参数并不是一个合适的常量,这3个函数都返回-1,并把errno置为EINVAL。
(2)有些name会返回一个变量值(返回值
@H_403_30@
≥
0)或者提示该值是不确定的。不确定的值通过返回-1来体现,而不改变errno的值。 (3)__SC__CLK__TCK的返回值是每秒的时钟滴答数,用于times函数的返回值。 对于pathconf的参数pathname和fpathconf的参数fd有很多限制。如果不满足其中任何一个限制,则结果是未定义的。