Commit bf1e307
Fix SIGUSR1/SIGUSR2 handler clobbering breaking JVM processes
signal() overwrote SIGUSR1 and SIGUSR2 without saving previous handlers,
causing JVM crashes (SIGSEGV in Monitor::wait) since the JVM uses these
signals internally for GC safepoints and thread management.
Replace signal() with sigaction() to save the old handlers, and chain
to them in the stubs so other runtimes (JVM, etc.) can still process
the signals correctly.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Casey Harford <casey@caseyharford.com>1 parent 54b0ca3 commit bf1e307
1 file changed
+20
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
76 | 80 | | |
77 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
78 | 85 | | |
79 | 86 | | |
80 | 87 | | |
81 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
82 | 92 | | |
83 | 93 | | |
84 | 94 | | |
| |||
689 | 699 | | |
690 | 700 | | |
691 | 701 | | |
692 | | - | |
693 | | - | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
694 | 712 | | |
695 | 713 | | |
696 | 714 | | |
| |||
0 commit comments