mirror of
https://github.com/apache/nuttx.git
synced 2026-08-02 12:49:00 +00:00
When pressing Ctrl-C, the foreground process did not receive SIGINT and failed to terminate. The serial driver called nxsig_tgkill(-1, dev->pid, signo) from interrupt context. With pid=-1, nxsig_dispatch() was called with thread=true, which requires stcb->group == this_task()->group. However, in interrupt context, this_task() returns the IDLE task, whose group differs from the target process group. This caused the signal dispatch to fail with -ESRCH. Solution: Replace nxsig_tgkill(-1, pid, signo) with nxsig_kill(pid, signo). nxsig_kill() uses thread=false, which routes through group_signal() without the same-group check, allowing signals to be delivered correctly from interrupt context. Impact: - Fixes Ctrl-C signal delivery in serial console - No API changes - Affects serial driver interrupt handling only Testing: Verified on QEMU ARM64 simulator with serial console Signed-off-by: yinshengkai <yinshengkai@bytedance.com> |
||
|---|---|---|
| .. | ||
| CMakeLists.txt | ||
| Kconfig | ||
| Kconfig-16550 | ||
| Kconfig-cmsdk | ||
| Kconfig-lpuart | ||
| Kconfig-pci | ||
| Kconfig-pl011 | ||
| Kconfig-sci | ||
| Kconfig-uart | ||
| Kconfig-usart | ||
| Make.defs | ||
| ptmx.c | ||
| pty.c | ||
| pty.h | ||
| serial.c | ||
| serial_cmsdk.c | ||
| serial_dma.c | ||
| serial_gdbstub.c | ||
| serial_io.c | ||
| uart_16550.c | ||
| uart_bth4.c | ||
| uart_bth5.c | ||
| uart_hostfs.c | ||
| uart_pci_16550.c | ||
| uart_pl011.c | ||
| uart_ram.c | ||
| uart_rpmsg.c | ||