| 45 | } |
| 46 | |
| 47 | void *thread_start(void *arg) { |
| 48 | pthread_barrier_wait(&started); |
| 49 | // As long as this thread is running, keep the shared variable latched to nonzero value. |
| 50 | while (!got_sigterm) { |
| 51 | sleepms(1); |
| 52 | } |
| 53 | printf("got term signal, sending signal back to main thread\n"); |
| 54 | pthread_kill(main_thread, SIGUSR1); |
| 55 | return NULL; |
| 56 | } |
| 57 | |
| 58 | int main() { |
| 59 | main_thread = pthread_self(); |
nothing calls this directly
no test coverage detected