当前位置: 首页 > news >正文

linux 系统errno 对应参考及代码

结论

linux下系统errno都有对应的说明描述,发生错误时获取errno即可知道具体问题描述

如下图

 代码如下

golang版

package main
import ("syscall""strings""fmt"
)
func main() {for i := 0; i <= 200; i++ {if !strings.HasPrefix(syscall.Errno(i).Error(), "errno ") {fmt.Printf("errno % 4d:%s\n", i, syscall.Errno(i).Error())}}
}

c++版

#include <iostream>
#include <string.h>
using namespace std;
int main()
{   for(int i=0; i<=200; i++){if (string(strerror(i)).find("error") == string::npos) {cout<<"errno  "<<i<<"  "<< strerror(i)<<endl;}}return 0;
}

http://www.lryc.cn/news/94664.html

相关文章:

  • PowerShell快速ssh
  • 从php5.6到golang1.19-文库App性能跃迁之路
  • 成功解决 AttributeError: ‘Field‘ object has no attribute ‘vocab‘
  • ikbc键盘2.4G接收器丢失,重新对码
  • STM32 Proteus仿真医用仓库环境控制系统紫外线消毒RS232上传CO2 -0066
  • Docker(二)之容器技术所涉及Linux内核关键技术
  • 计算机网络_ 1.3 网络核心 (数据交换_电路交换)
  • Kafka高性能集群部署与优化
  • Lucene介绍与入门使用
  • 【最短路+状压】CF1846 G
  • vue+elementui实现英雄联盟道具城
  • ruby注释
  • 2023(WAIC)智能驾驶科技峰会丨拓数派大模型下的数据计算系统,助力汽车智能化产业数据增值
  • 牛客周赛 Round 2
  • Git 命令提交和分支控制
  • 2023 node 接入腾讯云短信服务,实现发送短信功能
  • Devops系列四(使用argocd部署java应用到k8s容器)
  • 如何在Microsoft Excel中进行不连续区域批量填充
  • k8s+springboot+CronJob 定时任务部署
  • Spring5 中更优雅的第三方 Bean 注入
  • Yolov5-Face 原理解析及算法解析
  • 通俗易懂讲解CPU、GPU、FPGA的特点
  • PIC18 DataRAM 笔记
  • 【FFMPEG】AVFilter使用流程
  • 爬虫入门06——了解cookie和session
  • Ubuntu 的移动梦醒了
  • RabbitMQ的集群
  • 超长上下文处理:基于Transformer上下文处理常见方法梳理
  • ChatGPT爆火 但生成式AI并非全新产物
  • 深度学习循环神经网络