Skip to content

Conversation

@ThePassionate
Copy link
Contributor

@ThePassionate ThePassionate commented Jan 20, 2026

Summary

This PR fixes the compilation error in system/cu and simplifies code structure:

  1. Fix signal handler to use sa_sigaction - The previous commit 782de2748f introduced a bug where sigint() function uses siginfo->si_user but was declared with only one parameter (int sig). This causes compilation error because siginfo is undeclared. Fixed by using sa_sigaction with proper 3-parameter signature to receive siginfo_t.

  2. Merge cu.h to cu_main.c - Simplify code structure by merging the header file contents directly into cu_main.c. The cu_globals_s structure and related definitions are now directly in cu_main.c.

Impact

Fixes CI build error in system/cu.

Testing

Build tested with CONFIG_ENABLE_ALL_SIGNALS enabled.

The sigint() function uses siginfo->si_user but was declared with
only one parameter (int sig). This causes compilation error because
siginfo is undeclared.

Fix by:
1. Rename sigint to cu_exit with proper sigaction signature
2. Use sa_sigaction instead of sa_handler to receive siginfo_t
3. Pass cu pointer via sa.sa_user for signal handler access

Signed-off-by: makejian <[email protected]>
Merge the cu.h header file contents into cu_main.c to simplify the
code structure. The cu_globals_s structure and related definitions
are now directly in cu_main.c.

Signed-off-by: guoshichao <[email protected]>
@simbit18 simbit18 merged commit 755fae7 into apache:master Jan 20, 2026
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants