diff options
| author | fusion32 <marcopuzziello@gmail.com> | 2025-07-18 18:40:57 -0300 |
|---|---|---|
| committer | fusion32 <marcopuzziello@gmail.com> | 2025-07-18 18:40:57 -0300 |
| commit | 638244fd078fe91971e57b1d06e4499268d99c42 (patch) | |
| tree | c98efd5094b8065946250ee765c65fba7bc01b03 /src/main.cc | |
| parent | 6d498fe17dab48cfd8fc8a4da62a573b799e10ba (diff) | |
| download | game-638244fd078fe91971e57b1d06e4499268d99c42.tar.gz game-638244fd078fe91971e57b1d06e4499268d99c42.zip | |
small cleanup + fix sigaction flags
Diffstat (limited to 'src/main.cc')
| -rw-r--r-- | src/main.cc | 15 |
1 files changed, 5 insertions, 10 deletions
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; |
