花之剑'HOME

一朵飘舞在风中的雪花,挣扎着,不想被融化。

Linux 系统错误代码和信号的意义

Posted on 2008-03-05 09:59 花之剑 阅读(1218) 评论(0)  编辑  收藏 所属分类: c/c++ & algorithm

下面的列表显示常见的 Linux 系统错误代码。
1 EPERM
Operation not permitted
操作不许可
2 ENOENT
No such file or directory
无此文件或目录
3 ESRCH
No such process
无此过程
4 EINTR
Interrupted system call
系统调用被禁止
5 EIO
I/O error
I/O 错误
6 ENXIO
No such device or address
无此器件或地址
7 E2BIG
Arg list too long
Arg 列表太长
8 ENOEXEC
Exec format error
Exec 格式错误
9 EBADF
Bad file number
文件数目错误
10 ECHILD
No child processes
无子过程
11 EAGAIN
Try again
再试一遍
12 ENOMEM
Out of memory
内存溢出
13 EACCES
Permission denied
许可拒绝
14 EFAULT
Bad address
错误的地址
15 ENOTBLK
Block device required
需要块设备
16 EBUSY
Device or resource busy
设备或资源忙
17 EEXIST
File exists
文件存在
18 EXDEV
Cross-device link
跨器链接
19 ENODEV
No such device
无此设备
20 ENOTDIR
Not a directory
不是一个目录
21 EISDIR
Is a directory
是一个目录
22 EINVAL
Invalid argument
无效的函数自变量
23 ENFILE
File table overflow
文件表溢出
24 EMFILE
Too many open files
打开的文件太多
25 ENOTTY
Inappropriate ioctl for device

26 ETXTBSY
Text file busy
文本文件忙
27 EFBIG
File too large
文件太大
28 ENOSPC
No space left on device
磁盘空间不足
29 ESPIPE
Illegal seek
不合法的寻找
30 EROFS
Read-only file system
只读文件系统
31 EMLINK
Too many links
太多的链接


/* Signals.  */
#define SIGHUP          1       /* Hangup (POSIX).  */
#define SIGINT          2       /* Interrupt (ANSI).  */
#define SIGQUIT         3       /* Quit (POSIX).  */
#define SIGILL          4       /* Illegal instruction (ANSI).  */
#define SIGTRAP         5       /* Trace trap (POSIX).  */
#define SIGABRT         6       /* Abort (ANSI).  */
#define SIGIOT          6       /* IOT trap (4.2 BSD).  */
#define SIGBUS          7       /* BUS error (4.2 BSD).  */
#define SIGFPE          8       /* Floating-point exception (ANSI).  */
#define SIGKILL         9       /* Kill, unblockable (POSIX).  */
#define SIGUSR1         10      /* User-defined signal 1 (POSIX).  */
#define SIGSEGV         11      /* Segmentation violation (ANSI).  */
#define SIGUSR2         12      /* User-defined signal 2 (POSIX).  */
#define SIGPIPE         13      /* Broken pipe (POSIX).  */
#define SIGALRM         14      /* Alarm clock (POSIX).  */
#define SIGTERM         15      /* Termination (ANSI).  */
#define SIGSTKFLT       16      /* Stack fault.  */
#define SIGCLD          SIGCHLD /* Same as SIGCHLD (System V).  */
#define SIGCHLD         17      /* Child status has changed (POSIX).  */
#define SIGCONT         18      /* Continue (POSIX).  */
#define SIGSTOP         19      /* Stop, unblockable (POSIX).  */
#define SIGTSTP         20      /* Keyboard stop (POSIX).  */
#define SIGTTIN         21      /* Background read from tty (POSIX).  */
#define SIGTTOU         22      /* Background write to tty (POSIX).  */
#define SIGURG          23      /* Urgent condition on socket (4.2 BSD).  */
#define SIGXCPU         24      /* CPU limit exceeded (4.2 BSD).  */
#define SIGXFSZ         25      /* File size limit exceeded (4.2 BSD).  */
#define SIGVTALRM       26      /* Virtual alarm clock (4.2 BSD).  */
#define SIGPROF         27      /* Profiling alarm clock (4.2 BSD).  */
#define SIGWINCH        28      /* Window size change (4.3 BSD, Sun).  */
#define SIGPOLL         SIGIO   /* Pollable event occurred (System V).  */
#define SIGIO           29      /* I/O now possible (4.2 BSD).  */
#define SIGPWR          30      /* Power failure restart (System V).  */
#define SIGSYS          31      /* Bad system call.  */
#define SIGUNUSED       31

SIGKILL和SIGTOP是不能被忽略的两个信号,他允许用户分别终止并停止任何进程。


只有注册用户登录后才能发表评论。


网站导航: