| 51 | } |
| 52 | |
| 53 | int 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 | |
| 67 | bool hasExited(int status) { return WIFEXITED(status) > 0; } |
| 68 |
no test coverage detected