mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-29 05:40:16 -04:00
tests: Correct return code handling
Reviewed-by: Marek Chalupa <mchqwerty@gmail.com> Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
This commit is contained in:
parent
2eeb2cbc52
commit
9386e2be27
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue