Skip to content

Refactor the signal handler #40

@Buristan

Description

@Buristan

For now signal hanlder use exit() which is not async-signal-safe, see man 7 signal-safety. It is better to use _exit() instead.

luzer/luzer/luzer.c

Lines 147 to 157 in d2cb24d

NO_SANITIZE static void
sig_handler(int sig)
{
switch (sig) {
case SIGINT:
exit(0);
case SIGSEGV:
__sanitizer_print_stack_trace();
break;
}
}

Also, sometimes the crash- file is dumped if the user tries just to stop execution by SIGINT, so this file is not needed and is confusing.

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