mirror of
https://github.com/php/php-src.git
synced 2025-08-18 15:08:55 +02:00
improve ptrace() test
change error to warning - there can be no trace method available at all
This commit is contained in:
parent
ddc9246071
commit
3896e7403d
1 changed files with 4 additions and 4 deletions
|
@ -362,7 +362,7 @@ AC_DEFUN([AC_FPM_TRACE],
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
if (0 > ptrace(PTRACE_ATTACH, child, 0, 0)) {
|
if (0 > ptrace(PTRACE_ATTACH, child, 0, 0)) {
|
||||||
return 1;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
waitpid(child, &status, 0);
|
waitpid(child, &status, 0);
|
||||||
|
@ -376,7 +376,7 @@ AC_DEFUN([AC_FPM_TRACE],
|
||||||
};
|
};
|
||||||
|
|
||||||
if (0 > ptrace(PT_IO, child, (void *) &ptio, 0)) {
|
if (0 > ptrace(PT_IO, child, (void *) &ptio, 0)) {
|
||||||
ret = 1;
|
ret = 3;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
errno = 0;
|
errno = 0;
|
||||||
|
@ -384,7 +384,7 @@ AC_DEFUN([AC_FPM_TRACE],
|
||||||
v2 = ptrace(PTRACE_PEEKDATA, child, (void *) &v1, 0);
|
v2 = ptrace(PTRACE_PEEKDATA, child, (void *) &v1, 0);
|
||||||
|
|
||||||
if (errno) {
|
if (errno) {
|
||||||
ret = 1;
|
ret = 4;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
ptrace(PTRACE_DETACH, child, (void *) 1, 0);
|
ptrace(PTRACE_DETACH, child, (void *) 1, 0);
|
||||||
|
@ -495,7 +495,7 @@ AC_DEFUN([AC_FPM_TRACE],
|
||||||
fpm_trace_type=mach
|
fpm_trace_type=mach
|
||||||
|
|
||||||
else
|
else
|
||||||
AC_MSG_ERROR([FPM Trace - ptrace, pread, or mach: could not be found])
|
AC_MSG_WARN([FPM Trace - ptrace, pread, or mach: could not be found])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
])
|
])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue