Alexander Bluhm <[email protected]> wrote: > pledge(2) and so_state SS_DNS are special. There is no real risk > of a race and the flag is set only at socket creation.
Yes, this looks safe to me. ps_flags PS_PLEDGE and ps_pledge are only set inside locked pledge(), which makes the pledge_socket() SS_DNS check non-racy
