| 159 | } |
| 160 | |
| 161 | int wait_for_all_children(void) |
| 162 | { |
| 163 | int procs_no,i,ret; |
| 164 | char rc; |
| 165 | |
| 166 | clean_write_pipeend(); |
| 167 | |
| 168 | procs_no = count_init_child_processes(); |
| 169 | for (i=0;i<procs_no;i++) { |
| 170 | ret = wait_status_code(&rc); |
| 171 | if (ret < 0 || rc < 0) |
| 172 | return -1; |
| 173 | } |
| 174 | |
| 175 | return 0; |
| 176 | } |
| 177 | |
| 178 | /* cleans read pipe end |
| 179 | * for processes done reading */ |
no test coverage detected