Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getrlimit max open file descriptors checking code is never used due to missing autoconf check #191

Open
svdb0 opened this issue Sep 14, 2023 · 1 comment
Assignees

Comments

@svdb0
Copy link

svdb0 commented Sep 14, 2023

I noticed that some of the ewftools tools have code to check for the maximum number of open file descriptors.
These checks are within #if defined( HAVE_GETRLIMIT ) blocks.
There is however currently no autoconf code which actually checks for getrlimit() and sets HAVE_GETRLIMIT.
Also, the code which includes sys/resource.h, which is needed for getrlimit(), is contained within a #if defined( HAVE_SYS_RESOURCE_H ) block, and there is no autoconf code which checks for the presence of sys/resource.h and sets HAVE_SYS_RESOURCE_H.

Looking through the git history, I see that at one point there were such checks in configure.ac, so I can imagine that this was disabled on purpose for some reason. On the other hand, they might just have fallen between the cracks during a past refactoring.

I have not followed the code all the way through to see how the results of these getrlimit() checks, which are passed through multiple abstraction layers to be stored for later use, are ultimately used.
These checks stood out to me though because I have encountered the situation in the past that a collection of EWF files could not be mounted because the maximum number of open file descriptors was too small, without a helpful error message.

@joachimmetz
Copy link
Member

Thanks for flagging, I'll have a look when time permits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants