| 75 | } |
| 76 | |
| 77 | void crashHandler |
| 78 | ( |
| 79 | int sig, |
| 80 | siginfo_t *info, |
| 81 | void *ucontext |
| 82 | ) { |
| 83 | // pause all working threads |
| 84 | // NOTE: pausing is an async operation |
| 85 | ThreadPools_Pause(); |
| 86 | |
| 87 | startCrashReport(); |
| 88 | |
| 89 | // log currently executing GRAPH commands |
| 90 | logCommands(); |
| 91 | |
| 92 | endCrashReport(); |
| 93 | |
| 94 | // call previous (Redis original) handler |
| 95 | (*old_act.sa_sigaction)(sig, info, ucontext); |
| 96 | } |
| 97 | |
| 98 | void setupCrashHandlers |
| 99 | ( |
nothing calls this directly
no test coverage detected