zoukankan      html  css  js  c++  java
  • C Standard Library: 9 Signals: <signal.h>

    9 Signals: <signal.h>
    The header <signal.h> provides facilities for handling exceptional conditions that arise during
    execution, such as an interrupt signal from an external source or an error in execution.
    void (*signal(int sig, void (*handler)(int)))(int)
    signal determines how subsequent signals will be handled. If handler is SIG_DFL, the
    implementation-defined default behavior is used, if it is SIG_IGN, the signal is ignored;
    otherwise, the function pointed to by handler will be called, with the argument of the type of
    signal. Valid signals include
    SIGABRT abnormal termination, e.g., from abort
    SIGFPE arithmetic error, e.g., zero divide or overflow
    SIGILL illegal function image, e.g., illegal instruction
    SIGINT interactive attention, e.g., interrupt
    SIGSEGV illegal storage access, e.g., access outside memory limits
    SIGTERM termination request sent to this program
    signal returns the previous value of handler for the specific signal, or SIG_ERR if an error
    occurs.
    When a signal sig subsequently occurs, the signal is restored to its default behavior; then the
    signal-handler function is called, as if by (*handler)(sig). If the handler returns, execution
    will resume where it was when the signal occurred.
    The initial state of signals is implementation-defined.
    int raise(int sig)
    raise sends the signal sig to the program; it returns non-zero if unsuccessful.

    暂未使用

  • 相关阅读:
    一行代码更改博客园皮肤
    fatal: refusing to merge unrelated histories
    使用 netcat 传输大文件
    linux 命令后台运行
    .net core 使用 Nlog 配置文件
    .net core 使用 Nlog 集成 exceptionless 配置文件
    Mysql不同字符串格式的连表查询
    Mongodb between 时间范围
    VS Code 使用 Debugger for Chrome 调试vue
    css权重说明
  • 原文地址:https://www.cnblogs.com/freewater/p/2973436.html
Copyright © 2011-2022 走看看