fix: Add SA_ONSTACK flag to the event 16

This commit is contained in:
Alex Jbanca 2023-08-09 17:26:19 +03:00 committed by Alex Jbanca
parent 33b8ca84e8
commit eb6a33f385
1 changed files with 10 additions and 0 deletions

View File

@ -94,6 +94,16 @@ proc mainProc() =
echo("sigaltstack error!")
quit()
var sa: ptr Sigaction = cast[ptr Sigaction](allocShared0(sizeof(Sigaction)))
var sa2: Sigaction
sa.sa_handler = SIG_DFL
sa.sa_flags = SA_ONSTACK
if sigaction(SIGURG, sa[], addr sa2) < 0:
echo("sigaction error!")
quit()
if main_constants.IS_MACOS and defined(production):
setCurrentDir(getAppDir())