signal: add default sigaction for SIGURG

according to the posix standard: the default action for SIGURG is to
ignore the signal, we need to add the default sigaction handler for
SIGURG
this fix the /tset/ANSI.os/signal/signal_X/T.signal_X testcase

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
This commit is contained in:
guoshichao 2025-09-04 20:51:57 +08:00 committed by archer
parent a7f084bfd4
commit f47ff76589
2 changed files with 12 additions and 0 deletions

View file

@ -1671,6 +1671,15 @@ config SIG_SIGPOLL_ACTION
Backward compatible behavior would require that the application use
sigaction() to ignore SIGPOLL.
config SIG_SIGURG_ACTION
bool "SIGURG"
default n
---help---
Enable the default action for SIGURG (ignore the signal)
Make sure that your applications are expecting this POSIX behavior.
Backward compatible behavior would require that the application use
sigaction() to ignore SIGURG.
endif # SIG_DEFAULT
endmenu # Signal Configuration

View file

@ -149,6 +149,9 @@ static const struct nxsig_defaction_s g_defactions[] =
#ifdef CONFIG_SIG_SIGPOLL_ACTION
{ SIGPOLL, 0, nxsig_abnormal_termination },
#endif
#ifdef CONFIG_SIG_SIGURG_ACTION
{ SIGURG, 0, nxsig_null_action },
#endif
};
#define NACTIONS (sizeof(g_defactions) / sizeof(struct nxsig_defaction_s))