1 // RUN: %clangxx %s -o %t && %run %t %p
6 #include <sys/procctl.h>
9 struct procctl_reaper_status status
= {0};
11 res
= procctl(P_PID
, getpid(), PROC_REAP_STATUS
, &status
);
13 assert(errno
== EPERM
);
17 assert(status
.rs_flags
>= REAPER_STATUS_OWNED
);
19 res
= procctl(P_PID
, getpid(), PROC_ASLR_STATUS
, &aslr
);
21 assert(errno
== EPERM
);
25 assert(aslr
>= PROC_ASLR_FORCE_ENABLE
);