posix_spawnattr_setflags(3): validate argument
posix_spawn(3): add POSIX_SPAWN_DISABLE_ASLR_NP similar to Apple _POSIX_SPAWN_DISABLE_ASLR
This is less trivial then it seems.
First, flags argument for spawnattrs is only short, as mandated by POSIX. I considered adding posix_spawnattr_setflags_np() for implementation-specific namespace, but decided to be more similar to Apple there.
Second, the setting is inherited by children of the spawn process. Is it fine? For me yes.
Another NP flag that might be useful is to do ptrace(PT_TRACEME), but I did not found a precedent. While the ASLR flag is provided by Apple as _POSIX_SPAWN_DISABLE_ASLR.