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 ...
随机推荐
- vscode Js 插件 Jshint 的配置
vscode这款编辑器让人用起来很舒服,但是刚刚入手的童鞋可能会对其插件的安装产生一些恐惧,虽然vscode提供了插件的搜索和安装,但是其中一些插件是需要一些软件或者包之类的东西做支撑的,并不是在vs ...
- StringBuilder作用
String 类型和 StringBuffer 类型的主要性能区别其实在于 String 是不可变的对象因此在每次对 String 类型进行改变的时候其实都等同于生成了一个新的 String 对象,然 ...
- HDFS源码分析数据块复制监控线程ReplicationMonitor(一)
ReplicationMonitor是HDFS中关于数据块复制的监控线程,它的主要作用就是计算DataNode工作,并将复制请求超时的块重新加入到待调度队列.其定义及作为线程核心的run()方法如下: ...
- (个人开源)ffpanel --ffmpeg的GUI,让ffmpeg离开黑黑的命令行
程序及源代码下载地址 :https://github.com/langsim/ffpanel
- ubuntu系统安装好后一些基本软件的安装
preface: 由于某些原因重装了系统,原来在ubuntu下安装的一些软件又要又一次安装.稍微麻烦,整理下须要安装的步骤. #==================================== ...
- Docker入门系列4:命令行小结
百度Baidu App Engine(BAE)平台也是以Docker作为其PaaS云基础. 目的就是为了解决以下问题: 1) 环境管理复杂: 从各种OS到各种中间件再到各种App,一款产品能够成功发布 ...
- python读写数据篇
一.读写数据1.读数据 #使用open打开文件后一定要记得调用文件对象的close()方法.比如可以用try/finally语句来确保最后能关闭文件.file_object = open('thefi ...
- WCF基础之配置服务
在WCF应用编程中配置服务是其主要部分. 配置可以定义和自定义如何向客户端公开服务,包括服务地址,发送和接受消息的传输和编码,以及服务的安全类型. 服务的配置有两种:编码和使用config文件,大多数 ...
- Linux内核的编译安装
前言 Linux内核是Linux操作2347系统的核心,也是整个Linux功能体现的核心,就如同发动机在汽车中的重要性.内核主要功能包括进程管理.内存管理.文件管理.设备管理.网络管理等.Linux内 ...
- apache 301重定向到带www的二级域名
Options +FollowSymlinks RewriteEngine on rewritecond %{http_host} ^nlike.cn [nc] rewriterule ^(.*)$ ...