最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

linux之errno與signum:錯誤碼與信號詳解

 更新時間:2025年06月19日 08:48:00   作者:rtoax  
這篇文章主要介紹了linux之errno與signum:錯誤碼與信號,具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教

先看下cygwin的“sys/errno.h”文件

/* errno is not a global variable, because that would make using it
   non-reentrant.  Instead, its address is returned by the function
   __errno.  */

#ifndef _SYS_ERRNO_H_
#ifdef __cplusplus
extern "C" {
#endif
#define _SYS_ERRNO_H_

#include <sys/reent.h>

#ifndef _REENT_ONLY
#define errno (*__errno())
extern int *__errno (void);
#endif

/* Please don't use these variables directly.
   Use strerror instead. */
extern __IMPORT const char * const _sys_errlist[];
extern __IMPORT int _sys_nerr;
#ifdef __CYGWIN__
extern __IMPORT const char * const sys_errlist[];
extern __IMPORT int sys_nerr;
extern __IMPORT char *program_invocation_name;
extern __IMPORT char *program_invocation_short_name;
#endif

#define __errno_r(ptr) ((ptr)->_errno)

#define EPERM 1         /* Not owner */
#define ENOENT 2        /* No such file or directory */
#define ESRCH 3         /* No such process */
#define EINTR 4         /* Interrupted system call */
#define EIO 5           /* I/O error */
#define ENXIO 6         /* No such device or address */
#define E2BIG 7         /* Arg list too long */
#define ENOEXEC 8       /* Exec format error */
#define EBADF 9         /* Bad file number */
#define ECHILD 10       /* No children */
#define EAGAIN 11       /* No more processes */
#define ENOMEM 12       /* Not enough space */
#define EACCES 13       /* Permission denied */
#define EFAULT 14       /* Bad address */
#ifdef __LINUX_ERRNO_EXTENSIONS__
#define ENOTBLK 15      /* Block device required */
#endif
#define EBUSY 16        /* Device or resource busy */
#define EEXIST 17       /* File exists */
#define EXDEV 18        /* Cross-device link */
#define ENODEV 19       /* No such device */
#define ENOTDIR 20      /* Not a directory */
#define EISDIR 21       /* Is a directory */
#define EINVAL 22       /* Invalid argument */
#define ENFILE 23       /* Too many open files in system */
#define EMFILE 24       /* File descriptor value too large */
#define ENOTTY 25       /* Not a character device */
#define ETXTBSY 26      /* Text file busy */
#define EFBIG 27        /* File too large */
#define ENOSPC 28       /* No space left on device */
#define ESPIPE 29       /* Illegal seek */
#define EROFS 30        /* Read-only file system */
#define EMLINK 31       /* Too many links */
#define EPIPE 32        /* Broken pipe */
#define EDOM 33         /* Mathematics argument out of domain of function */
#define ERANGE 34       /* Result too large */
#define ENOMSG 35       /* No message of desired type */
#define EIDRM 36        /* Identifier removed */
#ifdef __LINUX_ERRNO_EXTENSIONS__
#define ECHRNG 37       /* Channel number out of range */
#define EL2NSYNC 38     /* Level 2 not synchronized */
#define EL3HLT 39       /* Level 3 halted */
#define EL3RST 40       /* Level 3 reset */
#define ELNRNG 41       /* Link number out of range */
#define EUNATCH 42      /* Protocol driver not attached */
#define ENOCSI 43       /* No CSI structure available */
#define EL2HLT 44       /* Level 2 halted */
#endif
#define EDEADLK 45      /* Deadlock */
#define ENOLCK 46       /* No lock */
#ifdef __LINUX_ERRNO_EXTENSIONS__
#define EBADE 50        /* Invalid exchange */
#define EBADR 51        /* Invalid request descriptor */
#define EXFULL 52       /* Exchange full */
#define ENOANO 53       /* No anode */
#define EBADRQC 54      /* Invalid request code */
#define EBADSLT 55      /* Invalid slot */
#define EDEADLOCK 56    /* File locking deadlock error */
#define EBFONT 57       /* Bad font file fmt */
#endif
#define ENOSTR 60       /* Not a stream */
#define ENODATA 61      /* No data (for no delay io) */
#define ETIME 62        /* Stream ioctl timeout */
#define ENOSR 63        /* No stream resources */
#ifdef __LINUX_ERRNO_EXTENSIONS__
#define ENONET 64       /* Machine is not on the network */
#define ENOPKG 65       /* Package not installed */
#define EREMOTE 66      /* The object is remote */
#endif
#define ENOLINK 67      /* Virtual circuit is gone */
#ifdef __LINUX_ERRNO_EXTENSIONS__
#define EADV 68         /* Advertise error */
#define ESRMNT 69       /* Srmount error */
#define ECOMM 70        /* Communication error on send */
#endif
#define EPROTO 71       /* Protocol error */
#define EMULTIHOP 74    /* Multihop attempted */
#ifdef __LINUX_ERRNO_EXTENSIONS__
#define ELBIN 75        /* Inode is remote (not really error) */
#define EDOTDOT 76      /* Cross mount point (not really error) */
#endif
#define EBADMSG 77      /* Bad message */
#define EFTYPE 79       /* Inappropriate file type or format */
#ifdef __LINUX_ERRNO_EXTENSIONS__
#define ENOTUNIQ 80     /* Given log. name not unique */
#define EBADFD 81       /* f.d. invalid for this operation */
#define EREMCHG 82      /* Remote address changed */
#define ELIBACC 83      /* Can't access a needed shared lib */
#define ELIBBAD 84      /* Accessing a corrupted shared lib */
#define ELIBSCN 85      /* .lib section in a.out corrupted */
#define ELIBMAX 86      /* Attempting to link in too many libs */
#define ELIBEXEC 87     /* Attempting to exec a shared library */
#endif
#define ENOSYS 88       /* Function not implemented */
#ifdef __CYGWIN__
#define ENMFILE 89      /* No more files */
#endif
#define ENOTEMPTY 90    /* Directory not empty */
#define ENAMETOOLONG 91 /* File or path name too long */
#define ELOOP 92        /* Too many symbolic links */
#define EOPNOTSUPP 95   /* Operation not supported on socket */
#define EPFNOSUPPORT 96 /* Protocol family not supported */
#define ECONNRESET 104  /* Connection reset by peer */
#define ENOBUFS 105     /* No buffer space available */
#define EAFNOSUPPORT 106 /* Address family not supported by protocol family */
#define EPROTOTYPE 107  /* Protocol wrong type for socket */
#define ENOTSOCK 108    /* Socket operation on non-socket */
#define ENOPROTOOPT 109 /* Protocol not available */
#ifdef __LINUX_ERRNO_EXTENSIONS__
#define ESHUTDOWN 110   /* Can't send after socket shutdown */
#endif
#define ECONNREFUSED 111        /* Connection refused */
#define EADDRINUSE 112          /* Address already in use */
#define ECONNABORTED 113        /* Software caused connection abort */
#define ENETUNREACH 114         /* Network is unreachable */
#define ENETDOWN 115            /* Network interface is not configured */
#define ETIMEDOUT 116           /* Connection timed out */
#define EHOSTDOWN 117           /* Host is down */
#define EHOSTUNREACH 118        /* Host is unreachable */
#define EINPROGRESS 119         /* Connection already in progress */
#define EALREADY 120            /* Socket already connected */
#define EDESTADDRREQ 121        /* Destination address required */
#define EMSGSIZE 122            /* Message too long */
#define EPROTONOSUPPORT 123     /* Unknown protocol */
#ifdef __LINUX_ERRNO_EXTENSIONS__
#define ESOCKTNOSUPPORT 124     /* Socket type not supported */
#endif
#define EADDRNOTAVAIL 125       /* Address not available */
#define ENETRESET 126           /* Connection aborted by network */
#define EISCONN 127             /* Socket is already connected */
#define ENOTCONN 128            /* Socket is not connected */
#define ETOOMANYREFS 129
#ifdef __LINUX_ERRNO_EXTENSIONS__
#define EPROCLIM 130
#define EUSERS 131
#endif
#define EDQUOT 132
#define ESTALE 133
#define ENOTSUP 134             /* Not supported */
#ifdef __LINUX_ERRNO_EXTENSIONS__
#define ENOMEDIUM 135   /* No medium (in tape drive) */
#endif
#ifdef __CYGWIN__
#define ENOSHARE 136    /* No such host or network path */
#define ECASECLASH 137  /* Filename exists with different case */
#endif
#define EILSEQ 138              /* Illegal byte sequence */
#define EOVERFLOW 139   /* Value too large for defined data type */
#define ECANCELED 140   /* Operation canceled */
#define ENOTRECOVERABLE 141     /* State not recoverable */
#define EOWNERDEAD 142  /* Previous owner died */
#ifdef __LINUX_ERRNO_EXTENSIONS__
#define ESTRPIPE 143    /* Streams pipe error */
#endif
#define EWOULDBLOCK EAGAIN      /* Operation would block */

#define __ELASTERROR 2000       /* Users can add values starting here */

#ifdef __cplusplus
}
#endif
#endif /* _SYS_ERRNO_H */

再看一下,signum對應的數(shù)值

$ kill -l
 1) SIGHUP       2) SIGINT       3) SIGQUIT      4) SIGILL       5) SIGTRAP
 6) SIGABRT      7) SIGEMT       8) SIGFPE       9) SIGKILL     10) SIGBUS
11) SIGSEGV     12) SIGSYS      13) SIGPIPE     14) SIGALRM     15) SIGTERM
16) SIGURG      17) SIGSTOP     18) SIGTSTP     19) SIGCONT     20) SIGCHLD
21) SIGTTIN     22) SIGTTOU     23) SIGIO       24) SIGXCPU     25) SIGXFSZ
26) SIGVTALRM   27) SIGPROF     28) SIGWINCH    29) SIGPWR      30) SIGUSR1
31) SIGUSR2     32) SIGRTMIN    33) SIGRTMIN+1  34) SIGRTMIN+2  35) SIGRTMIN+3
36) SIGRTMIN+4  37) SIGRTMIN+5  38) SIGRTMIN+6  39) SIGRTMIN+7  40) SIGRTMIN+8
41) SIGRTMIN+9  42) SIGRTMIN+10 43) SIGRTMIN+11 44) SIGRTMIN+12 45) SIGRTMIN+13
46) SIGRTMIN+14 47) SIGRTMIN+15 48) SIGRTMIN+16 49) SIGRTMAX-15 50) SIGRTMAX-14
51) SIGRTMAX-13 52) SIGRTMAX-12 53) SIGRTMAX-11 54) SIGRTMAX-10 55) SIGRTMAX-9
56) SIGRTMAX-8  57) SIGRTMAX-7  58) SIGRTMAX-6  59) SIGRTMAX-5  60) SIGRTMAX-4
61) SIGRTMAX-3  62) SIGRTMAX-2  63) SIGRTMAX-1  64) SIGRTMAX

自己體會

總結

以上為個人經(jīng)驗,希望能給大家一個參考,也希望大家多多支持腳本之家。

相關文章

  • Linux redis-Sentinel配置詳解

    Linux redis-Sentinel配置詳解

    這篇文章主要介紹了Linux redis-Sentinel配置詳解,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧
    2019-04-04
  • Linux系統(tǒng)網(wǎng)卡設置教程

    Linux系統(tǒng)網(wǎng)卡設置教程

    這篇文章主要介紹了Linux系統(tǒng)網(wǎng)卡的設置教程,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2017-06-06
  • centos redhat系列對抗ddos之居家必備利器 banip.txt

    centos redhat系列對抗ddos之居家必備利器 banip.txt

    本文可以用于redhat centos 系列 linux 系統(tǒng)的 屏蔽多連接ip,具有抗ddos功能的代碼。
    2010-11-11
  • linux grep查找的結果中顯示匹配行的上下行內(nèi)容方式

    linux grep查找的結果中顯示匹配行的上下行內(nèi)容方式

    這篇文章主要介紹了linux grep查找的結果中顯示匹配行的上下行內(nèi)容方式,具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教
    2023-11-11
  • 詳解ubuntu 16.04 LTS 降級安裝gcc 4.8

    詳解ubuntu 16.04 LTS 降級安裝gcc 4.8

    本篇文章主要介紹了ubuntu 16.04 LTS 降級安裝gcc 4.8 ,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2017-04-04
  • 詳解centos下搭建redis集群

    詳解centos下搭建redis集群

    這篇文章主要介紹了詳解centos下搭建redis集群,小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧
    2017-05-05
  • yum安裝wget命令使用方式

    yum安裝wget命令使用方式

    Wget是一個從網(wǎng)絡自動下載文件的工具,支持HTTP、HTTPS、FTP,并可使用HTTP代理,在虛擬機中發(fā)現(xiàn)wget命令不存在,通過yum安裝wget后,系統(tǒng)自動完成安裝并提示用戶,Yum是一個基于RPM的軟件包管理器,能夠自動下載、安裝并處理依賴項,支持安裝、刪除和更新軟件包,命令簡潔易用
    2025-09-09
  • Linux環(huán)境下安裝MySQL全過程

    Linux環(huán)境下安裝MySQL全過程

    在Linux系統(tǒng)中安裝MySQL需先切換至root用戶,卸載原有MariaDB/MySQL包,添加官方y(tǒng)um源,安裝服務,配置my.cnf并設置權限,最后通過臨時密碼或跳過驗證登錄
    2025-08-08
  • Linux下gdb調(diào)試打印棧幀中的變量過程

    Linux下gdb調(diào)試打印棧幀中的變量過程

    這篇文章主要介紹了Linux下gdb調(diào)試打印棧幀中的變量過程,具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教
    2023-09-09
  • centos 7中firewall防火墻的常用命令總結

    centos 7中firewall防火墻的常用命令總結

    大家都知道centos 7中防火墻是一個非常的強大的功能了,但對于centos 7中在防火墻中進行了升級了,下面這篇文章主要介紹了centos 7中firewall防火墻的常用命令,需要的朋友可以參考借鑒,下面來一起看看吧。
    2017-03-03

最新評論

玉溪市| 德保县| 安平县| 布拖县| 淳化县| 新野县| 昌图县| 崇阳县| 百色市| 广德县| 龙海市| 庆阳市| 察哈| 濮阳县| 会宁县| 开封县| 普定县| 萨嘎县| 平凉市| 澜沧| 股票| 金秀| 额济纳旗| 庆阳市| 建瓯市| 屏东县| 黄大仙区| 和顺县| 屯门区| 宁化县| 富阳市| 平原县| 东港市| 兰州市| 田阳县| 泾川县| 陈巴尔虎旗| 泸定县| 黄大仙区| 普兰店市| 虞城县|