Duncan Roe <duncan_...@optusnet.com.au> wrote: > On Sun, Sep 27, 2020 at 02:18:21PM -0600, Bob Beck wrote: > > On Sun, Sep 27, 2020 at 02:46:39PM +1000, Duncan Roe wrote: > > > The motivation for this is to make debug logs less confusing. > > > > What is this fixing and what behavior are you changing? > > You can only see the difference when running nc under gdb, if you choose to > breakpoint those lines that set pfd[POLL_xxxxxx].fd to -1. > > I was doing this because I wanted to track when file units got closed. > But sometimes an fd was getting set to -1 when it was -1 already, hence the > patch.
I disagree with your plan. This kind of "force it off" programming is typical.