Advanced Programming in UNIX Environment Episode 10

获得运行时限制函数

#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会返回一个变量值(返回值 0)或者提示该值是不确定的。不确定的值通过返回-1来体现,而不改变errno的值。 (3)__SC__CLK__TCK的返回值是每秒的时钟滴答数,用于times函数的返回值。 对于pathconf的参数pathname和fpathconf的参数fd有很多限制。如果不满足其中任何一个限制,则结果是未定义的。

相关文章

用的openwrt路由器,家里宽带申请了动态公网ip,为了方便把2...
#!/bin/bashcommand1&command2&wait从Shell脚本并行...
1.先查出MAMP下面集成的PHP版本cd/Applications/MAMP/bin/ph...
1、先输入locale-a,查看一下现在已安装的语言2、若不存在如...
BashPerlTclsyntaxdiff1.进制数表示Languagebinaryoctalhexa...
正常安装了k8s后,使用kubect工具后接的命令不能直接tab补全...