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

Function main

phxqueue/test/test_lock_main.cpp:150–169  ·  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 (pid == 0) {
160 /* send SIGHUP to me if parent dies. */
161 prctl(PR_SET_PDEATHSIG, SIGHUP);
162 LockRun(vpid);
163 exit(0);
164 }
165 }
166 sleep(1000);
167
168 return 0;
169}
170

Callers

nothing calls this directly

Calls 1

LockRunFunction · 0.85

Tested by

no test coverage detected