| 96 | static size_t g_ha_crumb_len = 0; |
| 97 | |
| 98 | static void ha_deadline_exit(int sig) { |
| 99 | (void)sig; |
| 100 | if (g_ha_crumb_fd >= 0 && g_ha_crumb_len > 0) { |
| 101 | ssize_t w = write(g_ha_crumb_fd, g_ha_crumb_msg, g_ha_crumb_len); |
| 102 | (void)w; |
| 103 | } |
| 104 | _exit(0); |
| 105 | } |
| 106 | |
| 107 | /* Whether snprintf wrote the whole string into a buffer of `cap` bytes. */ |
| 108 | static bool ha_fits(int written, size_t cap) { |