From 638244fd078fe91971e57b1d06e4499268d99c42 Mon Sep 17 00:00:00 2001 From: fusion32 Date: Fri, 18 Jul 2025 18:40:57 -0300 Subject: small cleanup + fix sigaction flags --- src/main.cc | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'src/main.cc') diff --git a/src/main.cc b/src/main.cc index 2089641..b838544 100644 --- a/src/main.cc +++ b/src/main.cc @@ -34,16 +34,11 @@ static sighandler_t handler(int signr, sighandler_t sighandler){ // signals that share the same handler. sigemptyset(&act.sa_mask); - // TODO(fusion): We had this weird logic in the decompiled version of this - // function but it looks like some GLIBC internal thing, since these values - // would mask signals 1020 and 1021 which don't really make sense. - // - //if(signr == SIGALRM){ - // act.sa_mask.__val[0x1f] = 0x20000000; - //}else{ - // act.sa_mask.__val[0x1f] = 0x10000000; - //} - // + if(signr == SIGALRM){ + act.sa_flags = SA_INTERRUPT; + }else{ + act.sa_flags = SA_RESTART; + } if(sigaction(signr, &act, &oldact) == 0){ return oldact.sa_handler; -- cgit v1.2.3