您的位置 首页 分销

Linux操作系统中错误码描绘及其意义

1. 简单明了,一个命令,想看什么看什么:# perror如# perror 0 表示Success, #perror 1表示Operation not permitted2. 直接看C文件里的定义:

1. 简单明了,一个指令,想看什么看什么:

# perror

如# perror 0 表明Success, #perror 1表明Operation not permitted

2. 直接看C文件里的界说:

# more /usr/include/asm-generic/errno-base.h (根本过错,从0到34)

# more /usr/include/asm-generic/errno.h (扩展过错,从35到131)

3. 写个C程序来瞧瞧:

# vi errorlist.c

#include

#include

#include

int main()

{

int i;

for (i=0; i257; i++)

{

printf(Error # %d: %s\n, i, strerror(i));

}

}

# gcc errorlist.c 编译该C文件

# ./a.out 履行,检查输出成果

声明:本文内容来自网络转载或用户投稿,文章版权归原作者和原出处所有。文中观点,不代表本站立场。若有侵权请联系本站删除(kf@86ic.com)https://www.86ic.net/bandaoti/fenxiao/326093.html

为您推荐

联系我们

联系我们

在线咨询: QQ交谈

邮箱: kf@86ic.com

关注微信
微信扫一扫关注我们

微信扫一扫关注我们

返回顶部