public static PipeSecurity GetAccessControl(this PipeStream stream)
{
// PipeState can not be Closed and the Handle can not be null or closed
var handle = stream.SafePipeHandle; // A non-null, open handle implies a non-closed PipeState.
return new PipeSecurity(handle, AccessControlSections.Access | AccessControlSections.Owner | AccessControlSections.Group);
}