RE: Closing files after fork

2021-08-25 Thread Matt Selsky via devel
> Nobody responded to my request, so I'll assume it isn't needed and start working on deleting it. > In hindsight, I'm surprised that Eric didn't remove it ages ago. (Or add a comment about why it is necessary.) Hi Hal, I think we close all FDs in order to reduce the number of FDs open with our

Re: Closing files after fork

2021-08-25 Thread Hal Murray via devel
Matt Selsky said: > I think we close all FDs in order to reduce the number of FDs open with our > old security context. Eg, if we seteuid() after fork, we want to drop all FDs > opened with root privileges. That would make sense if we were talking about some big complicated program with lots o

Re: Closing files after fork

2021-08-25 Thread ASSI via devel
Hal Murray via devel writes: >> Can somebody give me a lesson in why a program should close all it's >> descriptors? We can clean up a lot of crufty code if we drop that. > > Nobody responded to my request, so I'll assume it isn't needed and start > working on deleting it. You're getting ahead o