> On Sep 18, 2021, at 6:26 PM, Jason Thorpe <thor...@me.com> wrote:
>
>> On Sep 18, 2021, at 5:51 PM, Robert Elz <k...@munnari.oz.au> wrote:
>>
>> | You'll get EBADF if you try it on anything else
>>
>> and that's definitely wrong, on a pipe the system is allowed to return
>> EINVAL,
>> and that's what ought to be returned whenever the fd is not something that
>> supports chmod (etc). EBADF should only be used when the process doesn't
>> have the fd open.
>
> Oops, I may be wrong about that specific detail. I’ll double-check later.
Indeed, I was mistaken, you do get EINVAL in the “good fd that’s not a vnode”
case.
-- thorpej