Provide a pair of cap.Prctl{w,}() convenience functions

It can be difficult to use the syscall Prctl() with POSIX semantics,
so provide a function cap.Prctlw() that mirrors the call on all OS
threads of the runtime. cap.Prctl() is provided for convenience. It
should be used when reading state through the Prctl system call,
or when setting state that is naturally shared by the whole process.

Signed-off-by: Andrew G. Morgan <>
2 files changed