1

I am blocking a SIGINT in ucontext A, for example, say I hit ^C (SIGINT) while it is running, nothing happens as expected.

In context B, there is a SIGINT handler. When I swapcontext(A, B) then ucontext B immediately executes the signal handler. Even though context A is the one that received and blocked this signal. Is there a way to ensure process B does not enter the signal handler right away?

beans
  • 31
  • 5

1 Answers1

0

While I did not figure this out, using a critical flag, instead of blocking the signal was what I used.

beans
  • 31
  • 5