Linux下errno所代表的含义

2023-10-26

errno记录系统的最后一次错误代码,是一个int型,在errno.h中定义,以下程序用于输出errno所代表的含义,0~133有意义,其余的属于未定义。

#include<errno.h>                                                      
#include<stdio.h>
#include<stdlib.h>
#include<string.h>

int main(int argc, const char *argv[])
{
     int i = 0;
     for(i = 0;i<256;++i)
        printf("errno.%02d is: %s\n",i,strerror(i));
     return 0;
}


 

 

errno.00 is: Success

errno.01 is: Operation not permitted

errno.02 is: No such file or directory
errno.03 is: No such process
errno.04 is: Interrupted system call
errno.05 is: Input/output error
errno.06 is: No such device or address
errno.07 is: Argument list too long
errno.08 is: Exec format error
errno.09 is: Bad file descriptor
errno.10 is: No child processes
errno.11 is: Resource temporarily unavailable
errno.12 is: Cannot allocate memory
errno.13 is: Permission denied
errno.14 is: Bad address
errno.15 is: Block device required
errno.16 is: Device or resource busy
errno.17 is: File exists
errno.18 is: Invalid cross-device link
errno.19 is: No such device
errno.20 is: Not a directory
errno.21 is: Is a directory
errno.22 is: Invalid argument
errno.23 is: Too many open files in system
errno.24 is: Too many open files
errno.25 is: Inappropriate ioctl for device
errno.26 is: Text file busy
errno.27 is: File too large
errno.28 is: No space left on device
errno.29 is: Illegal seek
errno.30 is: Read-only file system
errno.31 is: Too many links
errno.32 is: Broken pipe
errno.33 is: Numerical argument out of domain
errno.34 is: Numerical result out of range
errno.35 is: Resource deadlock avoided
errno.36 is: File name too long
errno.37 is: No locks available
errno.38 is: Function not implemented
errno.39 is: Directory not empty
errno.40 is: Too many levels of symbolic links
errno.41 is: Unknown error 41
errno.42 is: No message of desired type
errno.43 is: Identifier removed
errno.44 is: Channel number out of range
errno.45 is: Level 2 not synchronized
errno.46 is: Level 3 halted
errno.47 is: Level 3 reset
errno.48 is: Link number out of range
errno.49 is: Protocol driver not attached
errno.50 is: No CSI structure available
errno.51 is: Level 2 halted
errno.52 is: Invalid exchange
errno.53 is: Invalid request descriptor
errno.54 is: Exchange full
errno.55 is: No anode
errno.56 is: Invalid request code
errno.57 is: Invalid slot
errno.58 is: Unknown error 58
errno.59 is: Bad font file format
errno.60 is: Device not a stream
errno.61 is: No data available
errno.62 is: Timer expired
errno.63 is: Out of streams resources
errno.64 is: Machine is not on the network
errno.65 is: Package not installed
errno.66 is: Object is remote
errno.67 is: Link has been severed
errno.68 is: Advertise error
errno.69 is: Srmount error
errno.70 is: Communication error on send
errno.71 is: Protocol error
errno.72 is: Multihop attempted
errno.73 is: RFS specific error
errno.74 is: Bad message
errno.75 is: Value too large for defined data type
errno.76 is: Name not unique on network
errno.77 is: File descriptor in bad state
errno.78 is: Remote address changed
errno.79 is: Can not access a needed shared library
errno.80 is: Accessing a corrupted shared library
errno.81 is: .lib section in a.out corrupted
errno.82 is: Attempting to link in too many shared libraries
errno.83 is: Cannot exec a shared library directly
errno.84 is: Invalid or incomplete multibyte or wide character
errno.85 is: Interrupted system call should be restarted
errno.86 is: Streams pipe error
errno.87 is: Too many users
errno.88 is: Socket operation on non-socket
errno.89 is: Destination address required
errno.90 is: Message too long
errno.91 is: Protocol wrong type for socket
errno.92 is: Protocol not available
errno.93 is: Protocol not supported
errno.94 is: Socket type not supported
errno.95 is: Operation not supported
errno.96 is: Protocol family not supported
errno.97 is: Address family not supported by protocol
errno.98 is: Address already in use
errno.99 is: Cannot assign requested address
errno.100 is: Network is down
errno.101 is: Network is unreachable
errno.102 is: Network dropped connection on reset
errno.103 is: Software caused connection abort
errno.104 is: Connection reset by peer
errno.105 is: No buffer space available
errno.106 is: Transport endpoint is already connected
errno.107 is: Transport endpoint is not connected
errno.108 is: Cannot send after transport endpoint shutdown
errno.109 is: Too many references: cannot splice
errno.110 is: Connection timed out
errno.111 is: Connection refused
errno.112 is: Host is down
errno.113 is: No route to host
errno.114 is: Operation already in progress
errno.115 is: Operation now in progress
errno.116 is: Stale file handle
errno.117 is: Structure needs cleaning
errno.118 is: Not a XENIX named type file
errno.119 is: No XENIX semaphores available
errno.120 is: Is a named type file
errno.121 is: Remote I/O error
errno.122 is: Disk quota exceeded
errno.123 is: No medium found
errno.124 is: Wrong medium type
errno.125 is: Operation canceled
errno.126 is: Required key not available
errno.127 is: Key has expired
errno.128 is: Key has been revoked
errno.129 is: Key was rejected by service
errno.130 is: Owner died
errno.131 is: State not recoverable
errno.132 is: Operation not possible due to RF-kill
errno.133 is: Memory page has hardware error

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Linux下errno所代表的含义 的相关文章

  • Web 客户端和 Expect100Continue

    使用 WebClient C NET 时设置 Expect100Continue 的最佳方法是什么 我有下面的代码 我仍然在标题中看到 100 continue 愚蠢的 apache 仍然抱怨 505 错误 string url http
  • 秒表有最长运行时间吗?

    多久可以Stopwatch在 NET 中运行 如果达到该限制 它会回绕到负数还是从 0 重新开始 Stopwatch Elapsed返回一个TimeSpan From MSDN https learn microsoft com en us
  • 如何为 Linux 桌面条目文件指定带有相对路径的图标?

    对于我的一个 Linux 应用程序 我有应用程序二进制文件 一个 launcher sh 脚本 针对 LD LIBRARY PATH 和一个 desktop 文件 所有这些都位于同一文件夹中 我想使用图标的相对路径而不是绝对路径 我试过了
  • 嵌套接口:将 IDictionary> 转换为 IDictionary>?

    我认为投射一个相当简单IDictionary
  • 从Web API同步调用外部api

    我需要从我的 Web API 2 控制器调用外部 api 类似于此处的要求 使用 HttpClient 从 Web API 操作调用外部 HTTP 服务 https stackoverflow com questions 13222998
  • BitTorrent 追踪器宣布问题

    我花了一点业余时间编写 BitTorrent 客户端 主要是出于好奇 但部分是出于提高我的 C 技能的愿望 我一直在使用理论维基 http wiki theory org BitTorrentSpecification作为我的向导 我已经建
  • HTTPWebResponse 响应字符串被截断

    应用程序正在与 REST 服务通信 Fiddler 显示作为 Apps 响应传入的完整良好 XML 响应 该应用程序位于法属波利尼西亚 在新西兰也有一个相同的副本 因此主要嫌疑人似乎在编码 但我们已经检查过 但空手而归 查看流读取器的输出字
  • python获取上传/下载速度

    我想在我的计算机上监控上传和下载速度 一个名为 conky 的程序已经在 conky conf 中执行了以下操作 Connection quality alignr wireless link qual perc wlan0 downspe
  • C# 中通过 Process.Kill() 终止的进程的退出代码

    如果在我的 C 应用程序中 我正在创建一个可以正常终止或开始行为异常的子进程 在这种情况下 我通过调用 Process Kill 来终止它 但是 我想知道该进程是否已退出通常情况下 我知道我可以获得终止进程的错误代码 但是正常的退出代码是什
  • 使用 \r 并打印一些文本后如何清除控制台中的一行?

    对于我当前的项目 有一些代码很慢并且我无法使其更快 为了获得一些关于已完成 必须完成多少的反馈 我创建了一个进度片段 您可以在下面看到 当你看到最后一行时 sys stdout write r100 80 n I use 80覆盖最终剩余的
  • C#中如何移动PictureBox?

    我已经使用此代码来移动图片框pictureBox MouseMove event pictureBox Location new System Drawing Point e Location 但是当我尝试执行时 图片框闪烁并且无法识别确切
  • 重载<<的返回值

    include
  • 使用 Bearer Token 访问 IdentityServer4 上受保护的 API

    我试图寻找此问题的解决方案 但尚未找到正确的搜索文本 我的问题是 如何配置我的 IdentityServer 以便它也可以接受 授权带有 BearerTokens 的 Api 请求 我已经配置并运行了 IdentityServer4 我还在
  • 如何设计以 char* 指针作为类成员变量的类?

    首先我想介绍一下我的情况 我写了一些类 将 char 指针作为私有类成员 而且这个项目有 GUI 所以当单击按钮时 某些函数可能会执行多次 这些类是设计的单班在项目中 但是其中的某些函数可以执行多次 然后我发现我的项目存在内存泄漏 所以我想
  • while 循环中的 scanf

    在这段代码中 scanf只工作一次 我究竟做错了什么 include
  • WPF/C# 将自定义对象列表数据绑定到列表框?

    我在将自定义对象列表的数据绑定到ListBox in WPF 这是自定义对象 public class FileItem public string Name get set public string Path get set 这是列表
  • 将控制台重定向到 .NET 程序中的字符串

    如何重定向写入控制台的任何内容以写入字符串 对于您自己的流程 Console SetOut http msdn microsoft com en us library system console setout aspx并将其重定向到构建在
  • 是否可以在 .NET Core 中将 gRPC 与 HTTP/1.1 结合使用?

    我有两个网络服务 gRPC 客户端和 gRPC 服务器 服务器是用 NET Core编写的 然而 客户端是托管在 IIS 8 5 上的 NET Framework 4 7 2 Web 应用程序 所以它只支持HTTP 1 1 https le
  • IEnumreable 动态和 lambda

    我想在 a 上使用 lambda 表达式IEnumerable
  • 哪种 C 数据类型可以表示 40 位二进制数?

    我需要表示一个40位的二进制数 应该使用哪种 C 数据类型来处理这个问题 如果您使用的是 C99 或 C11 兼容编译器 则使用int least64 t以获得最大的兼容性 或者 如果您想要无符号类型 uint least64 t 这些都定

随机推荐

  • 电赛需知

    电赛是大学生活里一个很好锻炼自己的机会 电赛前需要规划好电赛期间的几天生活 要撰写好方案 坚定信念 要注意饮食 电赛一般三到五人组队 需要很好的协作能力 较强的沟通能力 参赛期间难免会有争议 不要好高骛远 不要中途改方案
  • 部署langchain+chatglm

    先参考 window零基础部署langchain ChatGLM 飞奔的屎壳郎的博客 CSDN博客 安装一部分 1 GCC安装 gcc64位下载 一定要装64位的gcc 因为我的电脑是w10 64位的 装32位运行langchain报错并配
  • 在android studio下怎么引入android framework来使用隐藏的api

    在eclipse上很容易引入自己编译的android framework来使用系统隐藏的API 在android studio上就有点麻烦了 在gradle 1 0以前可以设置Provided编译属性来支持编译但不打包到dex里面 可是在新
  • 使用JS获得IP地址及其归属

    相关的API接口 ip 获取自己IP https api ip sb ip ip 获取自己IP https api ipify org 获取自己IP以及归属 https api ip sb geoip ip api com 接口 http
  • String 字符串 转为字符数组

    推荐阅读 AI文本 OCR识别最佳实践 AI Gamma一键生成PPT工具直达链接 玩转cloud Studio 在线编码神器 玩转 GPU AI绘画 AI讲话 翻译 GPU点亮AI想象空间 资源分享 史上最全文档AI绘画stabledif
  • Csharp:The .dat File using BinaryReader and BinaryWriter Convert to DataTable

  • Css3透明、background-size 属性

    background size length percentage cover contain 值 描述 测试 length 设置背景图像的高度和宽度 第一个值设置宽度 第二个值设置高度 如果只设置一个值 则第二个值会被设置为 auto 测
  • Python小知识点总结

    1 super 在类的继承中 如果重定义某个方法 该方法会覆盖父类的同名方法 但有时 我们希望能同时实现父类的功能 这时 我们就需要调用父类的方法了 可通过使用 super 来实现 class Animal object def init
  • ipv6 socket bind 失败 - accept_dad

    file proc sys net ipv6 conf interface accept dad variable net ipv6 conf interface accept dad Official reference Whether
  • 阿里一面:讲一讲 Spring、SpringMVC、SpringBoot、SpringCloud 之间的关系?

    大家好 我是Tom哥 搞后端开发的同学 对 Spring 家族一定不陌生 Spring 全家桶了为了解决不同场景的问题 逐渐演化出多套生态环框 如 Spring SpringMVC SpringBoot SpringCloud 它们之间的关
  • 区块链原理与应用(一)

    1 什么是区块链 mermaid svg z62l3eavYilXMK3m label font family trebuchet ms verdana arial font family var mermaid font family f
  • 【ML】2023 年面向初学者的十大机器学习项目

    大家好 我是Sonhhxg 柒 希望你看完之后 能对你有所帮助 不足请指正 共同学习交流 个人主页 Sonhhxg 柒的博客 CSDN博客 欢迎各位 点赞 收藏 留言 系列专栏 机器学习 ML 自然语言处理 NLP 深度学习 DL fore
  • elementUI 的 table 表格改变数据不更新问题

    预期效果 点击输入框旁边的图标 输入框变为可输入状态 这里控制输入的 editable 字段不是 data 原有的属性 也不是 data 赋值时就存在的字段 问题原因 在 Vue 实例创建时 以及 data 赋值时 editable 并未声
  • 随机从数组或集合中抽取一个值或 从list集合中随机抽几个值 或算权重

    直接上代码 package cn itcast jk util import java util Arrays import java util HashSet import java util Map import java util S
  • Xilinx-FPGA关于BUFFER(时钟/普通IO信号)的使用总结

    目录 前言 一 时钟BUFFER使用总结 二 普通IO输出时钟信号时的推荐方法 使用ODDR 前言 Xilinx FPGA开发过程中 关于时钟信号和普通IO信号引入FPGA内部需要遵循一定的使用方法 现在自己一年多使用过的内容做一个总结 也
  • springmvc request与response获取

    request与response是Tomcat服务器在收到客户端请求后自己生成的 无需我们自己创建 但是在使用的时候可以有以下三种方式去获取 1 Controller直接使用 方法上直接使用 通过DispatcherServlet将参数传到
  • linux 查看当前系统时间,并实时刷新

    使用watch命令 周期性的执行一个命令 并全屏显示 watch n 1 date即可 每1秒刷新date命令 格式 watch option command watch n 1 date n interval 表示每n秒执行date n最
  • nodejs中使用数据库逆向映射字段

    安装依赖 在搭建项目时 一般都是先创建数据库 在使用服务去访问数据 但是由于数据库的映射非常麻烦 导致需要书写大量的映射文件 对于nodejs 这里提出一个逆向工程 本文使用的是mysql数据库 首先安装 npm init 先初始化项目 n
  • java实现具有修饰的完美圣诞树

    A 有咋样的实力可以写出这个代码 B 会for循环就好 A 只要会for就好 B 还有一点点逻辑能力和算法 package 海绵hong import java util Scanner public class text9 public
  • Linux下errno所代表的含义

    errno记录系统的最后一次错误代码 是一个int型 在errno h中定义 以下程序用于输出errno所代表的含义 0 133有意义 其余的属于未定义 include