| 1853 | } |
| 1854 | |
| 1855 | void bugReportEnd(int killViaSignal, int sig) { |
| 1856 | struct sigaction act; |
| 1857 | |
| 1858 | serverLogRaw(LL_WARNING|LL_RAW, |
| 1859 | "\n=== REDIS BUG REPORT END. Make sure to include from START to END. ===\n\n" |
| 1860 | " Please report the crash by opening an issue on github:\n\n" |
| 1861 | " http://github.com/redis/redis/issues\n\n" |
| 1862 | " Suspect RAM error? Use redis-server --test-memory to verify it.\n\n" |
| 1863 | ); |
| 1864 | |
| 1865 | /* free(messages); Don't call free() with possibly corrupted memory. */ |
| 1866 | if (server.daemonize && server.supervised == 0 && server.pidfile) unlink(server.pidfile); |
| 1867 | |
| 1868 | if (!killViaSignal) { |
| 1869 | if (server.use_exit_on_panic) |
| 1870 | exit(1); |
| 1871 | abort(); |
| 1872 | } |
| 1873 | |
| 1874 | /* Make sure we exit with the right signal at the end. So for instance |
| 1875 | * the core will be dumped if enabled. */ |
| 1876 | sigemptyset (&act.sa_mask); |
| 1877 | act.sa_flags = SA_NODEFER | SA_ONSTACK | SA_RESETHAND; |
| 1878 | act.sa_handler = SIG_DFL; |
| 1879 | sigaction (sig, &act, NULL); |
| 1880 | kill(getpid(),sig); |
| 1881 | } |
| 1882 | |
| 1883 | /* ==================== Logging functions for debugging ===================== */ |
| 1884 |
no test coverage detected