If we’re talking about “ensure the file we’re opening is a regular file”, won’t O_REGULAR do that you want?
Attachment: signature.asc Description: Message signed with OpenPGP