> 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.
In hindsight, I'm surprised that Eric didn't remove it a
> 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
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
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
Thanks.
> It isn't hard to put your question into a search and get useful answers as to
> why this is a good practise (and also why it's crufty if you have to support
> more than just Linux or any other single system).
I poked around a bit and didn't find anything useful.
I found a web page tha
Hal Murray via devel writes:
> The close-everything code either has to skip the files it needs or
> reopen them. That requires keeping track of the files it needs which
> isn't something most programmers do. In our case, that was buggy.
This is a general thing you have to do do in a daemon that