(i: int)
| 124 | children = {} |
| 125 | |
| 126 | def start_child(i: int) -> Optional[int]: |
| 127 | pid = os.fork() |
| 128 | if pid == 0: |
| 129 | # child process |
| 130 | _reseed_random() |
| 131 | global _task_id |
| 132 | _task_id = i |
| 133 | return i |
| 134 | else: |
| 135 | children[pid] = i |
| 136 | return None |
| 137 | |
| 138 | for i in range(num_processes): |
| 139 | id = start_child(i) |
no test coverage detected