| 179 | char logPath[BUFF_SIZE]; |
| 180 | |
| 181 | static void buildFileName(char sbuff[BUFF_SIZE], int pid) { |
| 182 | time_t now; |
| 183 | |
| 184 | // Construct a filename |
| 185 | time(&now); |
| 186 | if (logPath[0] != '\0') { |
| 187 | SNPRINTF(sbuff, BUFF_SIZE, "%s", logPath); |
| 188 | } else { |
| 189 | SNPRINTF(sbuff, BUFF_SIZE, "stacktrace-%d-%d.log", (int)now, pid); |
| 190 | } |
| 191 | } |
| 192 | |
| 193 | SEGFAULT_HANDLER { |
| 194 | long address; |