On Wed, 18 Dec 2024 17:37:31 -0500 Steven Rostedt <rostedt@xxxxxxxxxxx> wrote: > No. If a function does not open a file descriptor, it should not close it. > It's bad programming style if a called function closes a file descriptor on > error that was passed to it. That can easily introduce new bugs. > > The fix is to not have it close a file descriptor at all! And this means all the callers should close their fd if the recorder fails. It should have never done that in the first place. :-/ Oh well, that was written over 10 years ago ;-) -- Steve
![]() |