| 148 | } |
| 149 | |
| 150 | int main(int argc, char **argv) { |
| 151 | if (SIG_ERR == signal(SIGCHLD, SIG_IGN)) { |
| 152 | perror("signal error"); |
| 153 | |
| 154 | exit(EXIT_FAILURE); |
| 155 | } |
| 156 | |
| 157 | for (int vpid{0}; vpid < 3; ++vpid) { |
| 158 | pid_t pid{fork()}; |
| 159 | if (0 == pid) { |
| 160 | /* send SIGHUP to me if parent dies. */ |
| 161 | prctl(PR_SET_PDEATHSIG, SIGHUP); |
| 162 | SchedulerRun(vpid); |
| 163 | exit(0); |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | sleep(1000); |
| 168 | |
| 169 | return 0; |
| 170 | } |
| 171 |
nothing calls this directly
no test coverage detected