Commit 9386e2be authored by Bryce Harrington's avatar Bryce Harrington
Browse files

tests: Correct return code handling


Reviewed-by: default avatarMarek Chalupa <mchqwerty@gmail.com>
Signed-off-by: default avatarBryce Harrington <bryce@osg.samsung.com>
parent 2eeb2cbc
......@@ -255,13 +255,13 @@ is_debugger_attached(void)
{
int status;
int rc;
int pid = fork();
pid_t pid = fork();
if (pid == -1)
return 0;
if (pid == 0) {
int ppid = getppid();
pid_t ppid = getppid();
if (ptrace(PTRACE_ATTACH, ppid, NULL, NULL) == 0) {
waitpid(ppid, NULL, 0);
ptrace(PTRACE_CONT, NULL, NULL);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment