Skip to content

Conversation

@SoucheSouche
Copy link
Collaborator

Change description

When deleting a linenoise instance, the linked list of in_fd / evenfd pair item is removed from the list but the evenfd is not closed.
When creating and deleting a lot of esp_linenoise instances, this causes the eventfd to eventually reach the MAX number of FD it can create.
Closing the eventfd associated with the esp_linenoise instance when deleting the instance prevents this.

@SoucheSouche SoucheSouche force-pushed the fix/esp_linenoise_eventfd_closing branch from f74663e to 627129c Compare November 12, 2025 11:11
@SoucheSouche SoucheSouche force-pushed the fix/esp_linenoise_eventfd_closing branch 2 times, most recently from b8e17af to 4da6a75 Compare November 12, 2025 12:02
@o-marshmallow
Copy link
Collaborator

LGTM! You may want to state in the KConfig that the bigger the ESP_LINENOISE_MAX_INSTANCE_NB, the more memory each instance will take

@SoucheSouche SoucheSouche force-pushed the fix/esp_linenoise_eventfd_closing branch from 4da6a75 to e869314 Compare November 13, 2025 09:36
…leting it

Add a Kconfig option to let the user select the maximum number of instance
that are possible to be created simultaneously.

Update the behavioral tests to test this new feature.
@SoucheSouche SoucheSouche force-pushed the fix/esp_linenoise_eventfd_closing branch from e869314 to bc12f55 Compare November 13, 2025 09:52
Copy link
Collaborator

@o-marshmallow o-marshmallow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@SoucheSouche SoucheSouche merged commit 2021ee1 into espressif:master Nov 13, 2025
161 of 162 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants