Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove SIGABRT from sigwait list #49445

Merged
merged 1 commit into from
Apr 24, 2023
Merged

remove SIGABRT from sigwait list #49445

merged 1 commit into from
Apr 24, 2023

Conversation

vtjnash
Copy link
Member

@vtjnash vtjnash commented Apr 20, 2023

This already is added to the sigdie list, so on mach it was attempting to handle it in both places simultaneously.

This already is added to the sigdie list, so on mach it was attempting
to handle it in both places simultaneously.
@inkydragon
Copy link
Member

inkydragon commented Apr 21, 2023

This already is added to the sigdie

xref:

act_die.sa_sigaction = sigdie_handler;

julia/src/signals-unix.c

Lines 1045 to 1047 in 186634e

if (sigaction(SIGABRT, &act_die, NULL) < 0) {
jl_errorf("fatal error: sigaction: %s", strerror(errno));
}


It looks like SIGINFO and SIGUSR1 have the same problem.

sigwait:

julia/src/signals-unix.c

Lines 647 to 653 in 186634e

const static int sigwait_sigs[] = {
SIGINT, SIGTERM, SIGABRT, SIGQUIT,
#ifdef SIGINFO
SIGINFO,
#else
SIGUSR1,
#endif

sigdie:

julia/src/signals-unix.c

Lines 1053 to 1061 in 186634e

#ifdef SIGINFO
if (sigaction(SIGINFO, &act_die, NULL) < 0) {
jl_errorf("fatal error: sigaction: %s", strerror(errno));
}
#else
if (sigaction(SIGUSR1, &act_die, NULL) < 0) {
jl_errorf("fatal error: sigaction: %s", strerror(errno));
}
#endif

@vtjnash
Copy link
Member Author

vtjnash commented Apr 21, 2023

It is not really a problem, in that our signal handler thread actually needs them to be set to something in order to be allowed to block them (see the comment there). Signal handling in posix is a bit of a disaster.

@vtjnash vtjnash merged commit c70e0fa into master Apr 24, 2023
@vtjnash vtjnash deleted the jn/sigabrt-sigwait branch April 24, 2023 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants