| 65 | |
| 66 | namespace { |
| 67 | void ActionHandler(int sig, siginfo_t* info, void* context) { |
| 68 | // TODO: Fix this |
| 69 | if (sig == SIGINT) { |
| 70 | // Someone trying to kill us. Shutdown. |
| 71 | ProcessPipe::Shutdown(); |
| 72 | |
| 73 | // Clear "^C" string that most terminals print when pressing Ctrl+C. |
| 74 | fprintf(stderr, "\r"); |
| 75 | return; |
| 76 | } |
| 77 | _exit(1); |
| 78 | } |
| 79 | |
| 80 | void ActionIgnore(int sig, siginfo_t* info, void* context) {} |
| 81 |