See posix_spawnattr_getflags.html