Skip to content

Dead loop caused by sa_sigaction being NULL #3

Description

@lkttle

Hello, I'm confused about one part of the project. After using sigaction(sig, &action_info, &old_sa[sig]) in the function signal_handler_init(), I found that the values of old_sa[sig].sa_handler or old_sa[sig].sa_sigaction is always 0, which will leads to a problem: when initialized with signal_catch_init(), if a signal generated outside the try-catch range is caught, it should reasonably be handled according to the default logic, but the default handler function obtained through the sigaction function is NULL, so the signal_handler function cannot correctly handle This can lead to a dead loop where the exception is constantly triggered and signal_handler keeps catching.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions