Shorten prctl code a tiny bit.
This commit is contained in:
parent
0fb7f59853
commit
0f916d39b0
|
@ -226,8 +226,7 @@ platform_disable_tracing(int strict)
|
||||||
{
|
{
|
||||||
#if defined(HAVE_PRCTL) && defined(PR_SET_DUMPABLE)
|
#if defined(HAVE_PRCTL) && defined(PR_SET_DUMPABLE)
|
||||||
/* Disable ptrace on Linux without sgid bit */
|
/* Disable ptrace on Linux without sgid bit */
|
||||||
if (prctl(PR_SET_DUMPABLE, 0) != 0)
|
if (prctl(PR_SET_DUMPABLE, 0) != 0 && strict)
|
||||||
if (strict)
|
fatal("unable to make the process undumpable");
|
||||||
fatal("unable to make the process undumpable");
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue