MCPcopy Create free account
hub / github.com/QBDI/QBDI / waitForStatus

Method waitForStatus

tools/validator/linux_process.cpp:53–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53int LinuxProcess::waitForStatus() {
54 int status = 0;
55 waitpid(this->pid, &status, 0);
56#if defined(QBDI_ARCH_X86_64) || defined(QBDI_ARCH_X86)
57 if (WSTOPSIG(status) == SIGBRK) {
58 GPR_STRUCT user;
59 ptrace(PTRACE_GETREGS, this->pid, NULL, &user);
60 fix_GPR_STRUCT(&user);
61 ptrace(PTRACE_SETREGS, this->pid, NULL, &user);
62 }
63#endif
64 return status;
65}
66
67bool hasExited(int status) { return WIFEXITED(status) > 0; }
68

Callers 1

start_masterFunction · 0.45

Calls 1

fix_GPR_STRUCTFunction · 0.50

Tested by

no test coverage detected