【Linux】Linux内核错误码整理

  • 当在Linux中代码遇到什么问题而又不知所措时,先尝试着打印一下错误码看看是什么错误。

#include <errno.h>        // 内核错误码所在的头文件

printf("error code:%d  codeInfo %s\n",errno,strerror(errno));        // 打印错误码和对应的错误信息

猜你喜欢

转载自blog.csdn.net/weixin_43729127/article/details/130914311