| 497 | #endif |
| 498 | |
| 499 | static bool worker_start_parent_watchdog(pid_t initial_ppid) { |
| 500 | static parent_watchdog_config_t worker_config; |
| 501 | worker_config.initial_ppid = initial_ppid; |
| 502 | worker_config.kill_worker_group = true; |
| 503 | worker_config.exit_on_parent_death = true; |
| 504 | cbm_thread_t worker_watchdog_tid; |
| 505 | if (cbm_thread_create(&worker_watchdog_tid, PARENT_WATCHDOG_STACK_SIZE, parent_watchdog_thread, |
| 506 | &worker_config) != 0) { |
| 507 | return false; |
| 508 | } |
| 509 | return cbm_thread_detach(&worker_watchdog_tid) == 0; |
| 510 | } |
| 511 | |
| 512 | static bool client_start_parent_watchdog(pid_t initial_ppid) { |
| 513 | if (initial_ppid <= 1) { |
no test coverage detected