Linux程序设计
rockly89
这个作者很懒,什么都没留下…
展开
-
#include <unistd.h> 的作用
由字面意思,unistd.h是unix std的意思,是POSIX标准定义的unix类系统定义符号常量的头文件,包含了许多UNIX系统服务的函数原型,例如read函数、write函数和getpid函数。 参考自 http://hi.baidu.com/w_dalu/item/e8d29860374ae02369105b11unistd.h在unix中类似于window中的w转载 2016-10-06 19:39:21 · 736 阅读 · 0 评论 -
如何获取linux下命令源码
1、Ubuntu中系统命令源代码的获取方法以32位Ubuntu14.04下,获取ls命令的源代码为例,可以使用如下的方法下载源代码:1)使用which命令查看ls命令的位置,如下:which ls # 输出:/bin/ls2)使用dpkg命令查询ls命令所属的包,如下:dpkg -S /bin/ls # 输出:coreutils: /bin/ls3)转载 2016-12-04 03:11:09 · 734 阅读 · 0 评论 -
Linux下获取内核版本号的函数q
man 2 unameNAME uname - get name and information about current kernelSYNOPSIS #include int uname(struct utsname *buf); struct utsname kernel_inf原创 2016-12-09 16:20:19 · 2287 阅读 · 0 评论 -
confstr--Linux下获取C标准库信息的函数
Linux下获取C标准库信息的函数 confstrman 3 confstrNAME confstr - get configuration dependent string variablesSYNOPSIS #include size_t confstr(int name, char *buf, size_t len);原创 2016-12-09 20:21:26 · 584 阅读 · 0 评论 -
errno值为0时的取值
当errno为0时,用strerror(errno)返回的字符串常量为Success原创 2017-04-04 21:31:32 · 6519 阅读 · 0 评论 -
TEMP_FAILURE_RETRY宏
https://www.gnu.org/savannah-checkouts/gnu/libc/manual/html_node/Interrupted-Primitives.htmlA signal can arrive and be handled while an I/O primitive such as open or read is waiting for an I/O dev转载 2017-05-15 23:21:43 · 2355 阅读 · 0 评论 -
uintX-t
typedef unsigned char uint8_t; //无符号8位数typedef signed char int8_t; //有符号8位数typedef unsigned int uint16_t; //无符号16位数typedef signed int int16_t; //有符号16位数typedef un原创 2017-06-22 11:19:15 · 334 阅读 · 0 评论