Signal handler function
| 300 | |
| 301 | // Signal handler function |
| 302 | void cleanup_handler(int signum) { |
| 303 | if (signum == SIGINT) { |
| 304 | printf("\nCtrl+C detected. Performing cleanup...\n"); |
| 305 | |
| 306 | printf("Cleanup complete. Exiting.\n"); |
| 307 | _exit(0); |
| 308 | } |
| 309 | } |
| 310 | |
| 311 | // This part of the program runs at startup, |
| 312 | // and parses input of from the user, and then |
nothing calls this directly
no outgoing calls
no test coverage detected