MCPcopy Create free account
hub / github.com/Tencent/phxqueue / main

Function main

phxqueue/test/test_scheduler_main.cpp:150–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148}
149
150int 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

Callers

nothing calls this directly

Calls 1

SchedulerRunFunction · 0.85

Tested by

no test coverage detected