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

最新文章

  1. h5应用缓存及收藏时Icon显示
  2. HDU 2732:Leapin' Lizards(最大流)
  3. maven基础知识
  4. 转 String,StringBuffer与StringBuilder的区别??
  5. 【leetcode】Word Break II
  6. PHP项目:如何用PHP高并发检索数据库?
  7. Nmap 源代码学习四 软件简单使用
  8. JavaScript的this简单实用
  9. PHP框架_ThinkPHP数据库
  10. leetcode_question_70 Climbing Stairs
  11. Simple python reverse shell
  12. B. OR in Matrix
  13. DVWA 黑客攻防演练(十一) 存储型 XSS 攻击 Stored Cross Site Scripting
  14. 10_30_unittest
  15. 六、Java多人博客系统-2.0版本-代码实现
  16. django restframework jwt
  17. DAY4(python)打印字符串以及增删改查
  18. Node 杂技
  19. Nginx 解析PHP的原理 | CGI、FastCGI及php-fpm的关系
  20. PHP实现简单下载功能

热门文章

  1. zabbix agent shell一键安装脚本
  2. 设计模式之单利模式(C#语言描述,附视频下载地址)
  3. Gson把对象转成json格式的字符串
  4. Error executing DDL via JDBC Statement
  5. ordinal parameter mismatch
  6. JavaScript toString() 方法
  7. 关于React的Container&Presentational Component模型结构分析
  8. OpenCV 中的三大数据类型( 概述 )
  9. MyBatis缓存介绍
  10. maven nexus 搭建