https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114581
--- Comment #1 from Ian Lance Taylor <ian at airs dot com> --- The behavior is different under gdb because gdb resends the signal. The program then sees it with an si_code field of SI_USER, which causes it to act differently.