| 478 | } |
| 479 | |
| 480 | static bool worker_prepare_process_group(void) { |
| 481 | pid_t process_id = getpid(); |
| 482 | return (setpgid(0, 0) == 0 || getpgrp() == process_id) && getpgrp() == process_id; |
| 483 | } |
| 484 | |
| 485 | /* A worker that cannot contain its own process tree must not index: on failure |
| 486 | * it would keep running as an orphan with no supervisor able to reap it. Shared |