We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4b690ab commit a1a557fCopy full SHA for a1a557f
src/cysignals/implementation.c
@@ -64,6 +64,7 @@ static void (*custom_set_pending_signal_pts[MAX_N_CUSTOM_HANDLERS])(int);
64
static int n_custom_handlers = 0;
65
66
int custom_signal_is_blocked(){
67
+ // Check if a custom block is set.
68
for(int i = 0; i < n_custom_handlers; i++){
69
if (custom_signal_is_blocked_pts[i]())
70
return 1;
@@ -72,12 +73,14 @@ int custom_signal_is_blocked(){
72
73
}
74
75
void custom_signal_unblock(){
76
+ // Unset all custom blocks.
77
for(int i = 0; i < n_custom_handlers; i++)
78
custom_signal_unblock_pts[i]();
79
80
81
82
void custom_set_pending_signal(int sig){
83
+ // Set a pending signal to custom handlers.
84
85
custom_set_pending_signal_pts[i](sig);
86
0 commit comments