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 a9576d0dde5407951658e5feb9b1d744e7b487b8
Author: liuhongchao <[email protected]>
AuthorDate: Mon Apr 20 15:38:17 2026 +0800

    graphics/input/getevent: Handle SIGTERM for graceful exit.
    
    Handle SIGTERM with the existing SIGINT handler so a default kill
    request stops the event loop and lets getevent release its resources
    before exiting.
    
    Assisted-by: OpenCode:claude-opus-5-5
    Signed-off-by: liuhongchao <[email protected]>
---
 graphics/input/getevent/getevent.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/graphics/input/getevent/getevent.c 
b/graphics/input/getevent/getevent.c
index 2380fd2ca..363e527b6 100644
--- a/graphics/input/getevent/getevent.c
+++ b/graphics/input/getevent/getevent.c
@@ -297,6 +297,7 @@ static void run_event_loop(FAR struct input_devices_ctx_s 
*ctx)
   sigemptyset(&sa.sa_mask);
   sa.sa_user = (FAR void *)&running;
   sigaction(SIGINT, &sa, NULL);
+  sigaction(SIGTERM, &sa, NULL);
 
   for (dev = ctx->head; dev; dev = dev->next)
     {

Reply via email to