Skip to content

feat: Limit the range of randomly generated fd in the WASI component #2102

Description

@hydai

Motivation

Due to some applications using the old select API, our current implementation follows the standard of WASI which means we will have a map to handle the randomly generated fd number (<= 2**31) to the actual fd number. However, in some cases, the application only accepts the fd number which is less than FD_SETSIZE (usually 1024).

It would be nice to have an API to set the range of the randomly generated fd numbers.

Details

  • Implement an internal function to control the range
  • Export this function as a configuration option in C API
  • Export a CLI option to control this flag
  • Write a section in the document

Appendix

Metadata

Metadata

Assignees

Labels

c-CAPIAn issue related to the WasmEdge C APIc-CLIAn issue related to WasmEdge CLI toolsc-InternalAn issue related to the WasmEdge internal data structures or algorithmsdocumentationImprovements or additions to documentationenhancementNew feature or request

Type

No type

Fields

No fields configured for issues without a type.

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions