免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2921 | 回复: 6
打印 上一主题 下一主题

请教:在哪里查看Linux 的 Error Code所代表的具体含义? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-03-11 09:41 |只看该作者 |倒序浏览
今天运行一个脚本,报错Unix error = 111,哪位高手知道这是什么意思?在Linux中在哪里查看具体的意义?谢谢

论坛徽章:
0
2 [报告]
发表于 2005-03-11 10:11 |只看该作者

请教:在哪里查看Linux 的 Error Code所代表的具体含义?

没人知道吗?沉的好快啊

论坛徽章:
0
3 [报告]
发表于 2005-03-11 10:41 |只看该作者

请教:在哪里查看Linux 的 Error Code所代表的具体含义?

在线等,有谁知道可以发邮件到hyl0623@hotmail.com,谢谢

论坛徽章:
0
4 [报告]
发表于 2005-03-11 15:43 |只看该作者

请教:在哪里查看Linux 的 Error Code所代表的具体含义?

不会吧,竟然没人回答?是不是问题太简单了?

论坛徽章:
0
5 [报告]
发表于 2005-03-11 15:54 |只看该作者

请教:在哪里查看Linux 的 Error Code所代表的具体含义?

不知道什么意思,要具体情况具体分析啊
由echo $?看出来的吗?
这个由exit(num)函数里的num决定....

论坛徽章:
5
荣誉会员
日期:2011-11-23 16:44:17CU大牛徽章
日期:2013-09-18 15:15:15CU大牛徽章
日期:2013-09-18 15:15:45未羊
日期:2014-02-25 14:37:19射手座
日期:2014-12-26 22:55:37
6 [报告]
发表于 2005-03-11 16:30 |只看该作者

请教:在哪里查看Linux 的 Error Code所代表的具体含义?

查/usr/incude/errno.h

论坛徽章:
0
7 [报告]
发表于 2005-03-11 16:59 |只看该作者

请教:在哪里查看Linux 的 Error Code所代表的具体含义?

  1. [ktktkt@Jintao ktktkt]$ cat /usr/include/errno.h
  2. /* Copyright (C) 1991,92,93,94,95,96,97,2002 Free Software Foundation, Inc.
  3.    This file is part of the GNU C Library.

  4.    The GNU C Library is free software; you can redistribute it and/or
  5.    modify it under the terms of the GNU Lesser General Public
  6.    License as published by the Free Software Foundation; either
  7.    version 2.1 of the License, or (at your option) any later version.

  8.    The GNU C Library is distributed in the hope that it will be useful,
  9.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  10.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  11.    Lesser General Public License for more details.

  12.    You should have received a copy of the GNU Lesser General Public
  13.    License along with the GNU C Library; if not, write to the Free
  14.    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  15.    02111-1307 USA.  */

  16. /*
  17. *      ISO C99 Standard: 7.5 Errors    <errno.h>;
  18. */

  19. #ifndef _ERRNO_H

  20. /* The includer defined __need_Emath if he wants only the definitions
  21.    of EDOM and ERANGE, and not everything else.  */
  22. #ifndef __need_Emath
  23. # define _ERRNO_H       1
  24. # include <features.h>;
  25. #endif

  26. __BEGIN_DECLS

  27. /* Get the error number constants from the system-specific file.
  28.    This file will test __need_Emath and _ERRNO_H.  */
  29. #include <bits/errno.h>;
  30. #undef  __need_Emath

  31. #ifdef  _ERRNO_H

  32. /* Declare the `errno' variable, unless it's defined as a macro by
  33.    bits/errno.h.  This is the case in GNU, where it is a per-thread
  34.    variable.  This redeclaration using the macro still works, but it
  35.    will be a function declaration without a prototype and may trigger
  36.    a -Wstrict-prototypes warning.  */
  37. #ifndef errno
  38. extern int errno;
  39. #endif

  40. #ifdef __USE_GNU

  41. /* The full and simple forms of the name with which the program was
  42.    invoked.  These variables are set up automatically at startup based on
  43.    the value of ARGV[0] (this works only if you use GNU ld).  */
  44. extern char *program_invocation_name, *program_invocation_short_name;
  45. #endif /* __USE_GNU */
  46. #endif /* _ERRNO_H */

  47. __END_DECLS

  48. #endif /* _ERRNO_H */

  49. /* The Hurd <bits/errno.h>; defines `error_t' as an enumerated type so
  50.    that printing `error_t' values in the debugger shows the names.  We
  51.    might need this definition sometimes even if this file was included
  52.    before.  */
  53. #if defined __USE_GNU || defined __need_error_t
  54. # ifndef __error_t_defined
  55. typedef int error_t;
  56. #  define __error_t_defined     1
  57. # endif
  58. # undef __need_error_t
  59. #endif
复制代码


咋看?我觉得还是要看程序员如何定义的~另外楼主说是调脚本。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP