poll() cannot be used to check if data can be written without blocking to a UART file descriptor (IDFGH-9640) #10986
Labels
Resolution: NA
Issue resolution is unavailable
Status: Done
Issue is done internally
Type: Bug
bugs in IDF
Answers checklist.
IDF version.
v5.0
Operating System used.
Linux
How did you build your project?
Command line with CMake
If you are using Windows, please specify command line type.
None
Development Kit.
ESP32-S3-DevKitC-1 v1.0
Power Supply used.
USB
What is the expected behavior?
The function poll() is used to check if read/write file operations can be performed without blocking. The virtual filesystem component allows accessing the UART port though file operations, therefore poll() should be able to tell if writing to stdout (or any other file descriptor that points to a UART) would block.
What is the actual behavior?
The function poll() does not work properly with UART file descriptors, as it is not able to check if an UART file is writeable using the event POLLOUT. This issue affects both the standard file descriptors (stdout, stderr) as well as other files opened with the standard function open().
Steps to reproduce.
This behaviour can be reproduced with the following example:
Debug Logs.
More Information.
No response
The text was updated successfully, but these errors were encountered: