10 Mar
2025
10 Mar
'25
9:15 p.m.
I'm not sure how to do it here. I can use the source's fd->inode and device but: 1. How do I check if it's a directory without `stat`ing it? (needed for the first fstat() but also below at the `if (create_link || S_ISDIR( st2.st_mode ))` line) 2. `unlink_closed_fd` appears to think it can mismatch. I mean it makes sense (since in Linux we can remove open fds), didn't know we even guard against it though. Should it be a concern here?