In article <[email protected]>, Robert Elz <[email protected]> wrote: > Date: Thu, 29 Sep 2022 08:18:28 -0400 > From: "Christos Zoulas" <[email protected]> > Message-ID: <[email protected]> > > | Log Message: > | Add fd_set_exclose(). It is probably better to do this automatically in > | fd_affix()... > >Since that only affects /dev/ptmx I'd suggest fixing it generally for all >cloning devices (and handling O_??LOCK as well) would be a better method.
I think that the way to go is to: 1. Do the fd_set_exclose() in fd_affix(). That will remove most of the calls to fd_set_exclose() *and* the open-coded versions of it. 2. Move the open_setfp locking initialization code to fd_affix() and do it if fp->f_type == DTYPE_VNODE. This should enable locking in all the appropriate cloners. Best, christos
