linux 下errno各个值的意义(转) errno.h
strerror(errno):获取errno对应的错误 查看错误代码errno是调试程序的一个重要方法。当linux C api函数发生异常时,一般会将errno变量(需include errno.h)赋一个整数值,不同的值表示不同的含义,可以通过查看该值推测出错的原因。在实际编程中用这一招解决了不少原本看来莫名其妙的问题。比较 麻烦的是每次都要去linux源代码里面查找错误代码的含义,现在把它贴出来,以后需要查时就来这里看了。 errno. is: Success
errno. is: Operation not permitted
errno. is: No such file or directory
errno. is: No such process
errno. is: Interrupted system call
errno. is: Input/output error
errno. is: No such device or address
errno. is: Argument list too long
errno. is: Exec format error
errno. is: Bad file descriptor
errno. is: No child processes
errno. is: Resource temporarily unavailable[资源临时不可用](连续发送数据时候回出此错,加延时)
errno. is: Cannot allocate memory
errno. is: Permission denied
errno. is: Bad address
errno. is: Block device required
errno. is: Device or resource busy
errno. is: File exists
errno. is: Invalid cross-device link
errno. is: No such device
errno. is: Not a directory
errno. is: Is a directory
errno. is: Invalid argument
errno. is: Too many open files in system
errno. is: Too many open files
errno. is: Inappropriate ioctl for device
errno. is: Text file busy
errno. is: File too large
errno. is: No space left on device
errno. is: Illegal seek
errno. is: Read-only file system
errno. is: Too many links
errno. is: Broken pipe[断开的管道](原因:the broken pipe error occurs if one end of the
TCP socket closes connection(using disconnect) or gets killed and the other
end tries to still write to it. An indication of a closed/terminated
connection is a return value of when you try to read from that socket
using recv. After receiving such an error, if you try to still write to the
socket, your process gets sent the SIGPIPE signal which kills it.
)
errno. is: Numerical argument out of domain
errno. is: Numerical result out of range
errno. is: Resource deadlock avoided
errno. is: File name too long
errno. is: No locks available
errno. is: Function not implemented
errno. is: Directory not empty
errno. is: Too many levels of symbolic links
errno. is: Unknown error
errno. is: No message of desired type
errno. is: Identifier removed
errno. is: Channel number out of range
errno. is: Level not synchronized
errno. is: Level halted
errno. is: Level reset
errno. is: Link number out of range
errno. is: Protocol driver not attached
errno. is: No CSI structure available
errno. is: Level halted
errno. is: Invalid exchange
errno. is: Invalid request descriptor
errno. is: Exchange full
errno. is: No anode
errno. is: Invalid request code
errno. is: Invalid slot
errno. is: Unknown error
errno. is: Bad font file format
errno. is: Device not a stream
errno. is: No data available
errno. is: Timer expired
errno. is: Out of streams resources
errno. is: Machine is not on the network
errno. is: Package not installed
errno. is: Object is remote
errno. is: Link has been severed
errno. is: Advertise error
errno. is: Srmount error
errno. is: Communication error on send
errno. is: Protocol error
errno. is: Multihop attempted
errno. is: RFS specific error
errno. is: Bad message
errno. is: Value too large for defined data type
errno. is: Name not unique on network
errno. is: File descriptor in bad state
errno. is: Remote address changed
errno. is: Can not access a needed shared library
errno. is: Accessing a corrupted shared library
errno. is: .lib section in a.out corrupted
errno. is: Attempting to link in too many shared libraries
errno. is: Cannot exec a shared library directly
errno. is: Invalid or incomplete multibyte or wide character
errno. is: Interrupted system call should be restarted
errno. is: Streams pipe error
errno. is: Too many users
errno. is: Socket operation on non-socket
errno. is: Destination address required
errno. is: Message too long
errno. is: Protocol wrong type for socket
errno. is: Protocol not available
errno. is: Protocol not supported
errno. is: Socket type not supported
errno. is: Operation not supported
errno. is: Protocol family not supported
errno. is: Address family not supported by protocol
errno. is: Address already in use
errno. is: Cannot assign requested address
errno. is: Network is down
errno. is: Network is unreachable
errno. is: Network dropped connection on reset
errno. is: Software caused connection abort
errno. is: Connection reset by peer[l连接被对端重置]
errno. is: No buffer space available
errno. is: Transport endpoint is already connected
errno. is: Transport endpoint is not connected
errno. is: Cannot send after transport endpoint shutdown
errno. is: Too many references: cannot splice
errno. is: Connection timed out
errno. is: Connection refused
errno. is: Host is down
errno. is: No route to host
errno. is: Operation already in progress
errno. is: Operation now in progress
errno. is: Stale NFS file handle
errno. is: Structure needs cleaning
errno. is: Not a XENIX named type file
errno. is: No XENIX semaphores available
errno. is: Is a named type file
errno. is: Remote I/O error
errno. is: Disk quota exceeded
errno. is: No medium found
errno. is: Wrong medium type
errno. is: Operation canceled
errno. is: Required key not available
errno. is: Key has expired
errno. is: Key has been revoked
errno. is: Key was rejected by service
errno. is: Owner died
errno. is: State not recoverable
errno. is: Unknown error
- 全是Unknown error
linux 下errno各个值的意义(转) errno.h的更多相关文章
- linux下各种颜色文件的意义
linux下的文件颜色的意义 蓝色表示目录;绿色表示可执行文件;红色表示压缩文件;浅蓝色表示链接文件;灰色表示其它文件;红色闪烁表示链接的文件有问题了;黄色是设备文件,包括block, char, f ...
- Linux使用技巧:linux下将命令值赋给shell变量
很多小伙伴在写shell脚本的时候需要把命令输出的值赋给一些变量,使得脚本在运行过程中能够顺利使用这些变量.例如:很多时候我们就需要获取当前目录的绝对路径,pwd这个命令大家在熟悉不过,可是要把这个命 ...
- Linux下不同文件不同颜色的意义
通常,我们使用ls查看文件时,会出现不同颜色的文件,今天我就大概写一下不同颜色的代表意义: 蓝色————目录: 绿色————可执行文件: 红色————压缩文件: 浅蓝色————链接文件: 紫红色——— ...
- linux下编译时遇到fatal error: openssl/sha.h: No such file or directory怎么办?
答:安装ssl开发库 ubuntu下的安装方法为: sudo apt-get install libssl-dev -y
- 转:socket编程在windows和linux下的区别
如无其它说明,本文所指Linux均表示2.6内核Linux,GCC编译器,Windows均表示Windows XP系统,Visual Studio 2005 sp1编译环境. 下面大概分几个方面进行罗 ...
- socket编程在windows和linux下的区别
如无其它说明,本文所指Linux均表示2.6内核Linux,GCC编译器,Windows均表示Windows XP系统,Visual Studio 2005 sp1编译环境. 下面大概分几个方面进行罗 ...
- Linux下时间格式转换及获取方法
Linux下使用clock_gettime给程序计时 #include <stdio.h> #include <unistd.h> #include <stdlib.h& ...
- Windows下计算md5值
目录 Windows下计算md5值 1.linux 下计算md5值 2.Windows下计算md5值 Windows下计算md5值 1.linux 下计算md5值 [root@master yl]# ...
- 在windows 、linux下读取目录下所有文件名
Windows要引入的头文件是<Windows.h> 主要是两个函数FindFirstFile.FindNextFile MSDN里是这么说的: FindFirstFile functio ...
随机推荐
- Away3D引擎学习笔记(一)资源加载解析块
前文:Away3D断断续续用了一段时间了,三维相关的很多算法,计算转换还是有点绕,整理些自己觉得还有点意思东西,希望大家有用. 三维开始,Away3D构架你场景那几行代码各处都有,这里就不copy了, ...
- JavaScritpt的DOM初探之Node(一)
DOM(文档对象模型)是针对HTML和XML文档的一个API. DOM描绘了一个层次化的节点树.同意开发者加入,移除和改动页面的某一部分.DOM脱胎于微软公司的DHTLM(动态HTML),可是如今它已 ...
- Unity3D 与 objective-c 之间数据交互。iOS SDK接口封装Unity3D接口 .-- 转载
Unity 3D 简单工程的创建.与Xcode 导出到iOS 平台请看这 Unity3D 学习 创建简单的按钮.相应事件 Unity C# 代码 using UnityEngine; using Sy ...
- ms人物上线
在看MS人物上线 else if(gs2ms_add_player == pkt.cmd) { PlayerChannel* pPC = new PlayerChannel(this); //加到地图 ...
- BZOJ 1597: [Usaco2008 Mar]土地购买 斜率优化
1597: [Usaco2008 Mar]土地购买 Time Limit: 10 Sec Memory Limit: 162 MB Description 农夫John准备扩大他的农场,他正在考虑N ...
- Java泛型【转】
一. 泛型概念的提出(为什么需要泛型)? 首先,我们看下下面这段简短的代码: public class GenericTest { public static void main(String[] a ...
- SQL 经验总结
总结日常工作中使用SQL遇到的坑和技巧,一是加深印象,二是方便回顾.会不定期更新. 坑 1.多表联查时要使用表名,如果两个表的有列名相同的情况你没有加别名,那么sql编译器就不知道使用哪个列.这时进行 ...
- OpenFileDialog对话框Filter属性(转)
OpenFileDialog对话框的Filter属性说明: 首先说明一个示例,分析一下Filter属性的构成:“ Excel文件|*.xls ”,前面的“Excel文件”成为标签,是一个可读的字符串, ...
- 九度OJ 1023:EXCEL排序 (排序)
时间限制:1 秒 内存限制:32 兆 特殊判题:否 提交:14605 解决:3307 题目描述: Excel可以对一组纪录按任意指定列排序.现请你编写程序实现类似功能. 对每个测试用例 ...
- Large-scale Incremental Processing Using Distributed Transactions and Notifications
Large-scale Incremental Processing Using Distributed Transactions and Notifications