On Wed, Jun 05, 2024 at 03:28:55AM +0100, Al Viro wrote: > Current solution is to have dup2() fail with -EBUSY. However, > there's an approach that might avoid that wart. I'm not sure whether > it's worth bothering with - it will have a cost, but then it might reduce > the pingpong on current->files->file_lock. Gah... Nevermind, that benefit is no longer there (and I really need to get some sleep - only went "wait a sec, that lock hadn't been taken in fd_install() since way back" after sending)