Only check PK_SUGID once. Still looks to have MP timing windows.
Copy out p->p_limit->pl_corename with pl_lock held - it can be a shared
string, and might be updated by another process.
Part of fix for PR/3696
Add XXX note that check for MNT_NOCOREDUMP doesn't actually check the
correct directory.
P_*/L_* naming convention, and rename the in-kernel flags to avoid
conflict. (P_ -> PK_, L_ -> LW_ ). Add back the (now unused) LSDEAD
constant.
Restores source compatibility with pre-newlock2 tools like ps or top.
Reviewed by Andrew Doran.