This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git

commit 0b7ffa25d7ce0d7310e83d0db3b64ab246c7d4f8
Author: fangpeina <[email protected]>
AuthorDate: Fri Nov 13 15:38:33 2026 +0800

    system/nxinit: call the poller handler when its fd is negative
    
    Call the poller handler when its fd is negative, so a poller that
    opens its fd later gets a chance to open it.
    
    Signed-off-by: fangpeina <[email protected]>
    Signed-off-by: wangjianyu3 <[email protected]>
---
 system/nxinit/init.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/system/nxinit/init.c b/system/nxinit/init.c
index 19ce5447f..7d10e4e03 100644
--- a/system/nxinit/init.c
+++ b/system/nxinit/init.c
@@ -315,7 +315,8 @@ int main(int argc, FAR char *argv[])
 
       for (i = 0; i < nitems(poller); i++)
         {
-          if (poller[i].pfd->revents & poller[i].pfd->events)
+          if (poller[i].pfd->fd < 0 ||
+              (poller[i].pfd->revents & poller[i].pfd->events))
             {
               poller[i].handle(&poller[i]);
             }

Reply via email to