| 563 | #endif |
| 564 | |
| 565 | static bool worker_start_parent_watchdog(pid_t initial_ppid) { |
| 566 | static parent_watchdog_config_t worker_config; |
| 567 | worker_config.initial_ppid = initial_ppid; |
| 568 | worker_config.kill_worker_group = true; |
| 569 | worker_config.exit_on_parent_death = true; |
| 570 | cbm_thread_t worker_watchdog_tid; |
| 571 | if (cbm_thread_create(&worker_watchdog_tid, PARENT_WATCHDOG_STACK_SIZE, parent_watchdog_thread, |
| 572 | &worker_config) != 0) { |
| 573 | return false; |
| 574 | } |
| 575 | return cbm_thread_detach(&worker_watchdog_tid) == 0; |
| 576 | } |
| 577 | |
| 578 | static bool client_start_parent_watchdog(pid_t initial_ppid) { |
| 579 | if (initial_ppid <= 1) { |
no test coverage detected