nuttx/drivers
Xiang Xiao 95063bde15 drivers/serial: add job-control TTY ioctls and libc wrappers
NuttX has no real session/process-group abstraction, so the TTY layer
collapses the foreground process group onto the single dev->pid field
(pgrp == pid, one member per group).  Extend the controlling-terminal
support so portable software (e.g. dropbear, socat) that relies on
job-control primitives works without losing the existing NuttX-specific
behaviour.

Driver (serial.c, pty.c):
- TIOCSCTTY now accepts a flag: arg > 0 keeps the historical "target
  PID in arg" semantics (NSH registers the foreground command it just
  spawned), while arg == 0 selects the calling task via
  nxsched_getpid(), matching the POSIX flag convention used by
  dropbear/socat/apue.  This preserves all existing callers and makes
  the previously-dead arg==0 path deliver SIGINT correctly.
- Add TIOCGPGRP/TIOCGSID (return dev->pid) and TIOCSPGRP (set it).
- pty.c gains the same handlers against pd_pid and includes
  nuttx/sched.h for nxsched_getpid().

ioctl numbers (tioctl.h): TIOCGPGRP/TIOCSPGRP/TIOCGSID at 0x37-0x39.

libc wrappers:
- termios: tcgetpgrp(), tcsetpgrp(), tcgetsid() over the new ioctls.
- unistd: setsid()/getsid()/setpgid() stubs consistent with the
  existing getpgrp()/getpgid() single-session model (sid == pgid ==
  pid; setpgid only succeeds for pgid == pid).

Declare the new prototypes in unistd.h (tcgetsid was already in
termios.h) and register all sources in the Make.defs/CMakeLists.

Group-broadcast signalling (kill(-pgrp)) remains unsupported, so
tty signals still target the single dev->pid; a real session/process
group model is left as a follow-up.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-06-23 16:26:53 -03:00
..
1wire style: fix checkpatch issues after debug.h move 2026-04-07 07:50:06 -03:00
aie include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
analog drivers/analog/dac7554: Add NULL checks after kmm_malloc in dac7554_initialize 2026-05-30 17:50:14 +08:00
audio !sys/types.h: change time_t and clock_t to int64_t to align with other OSes 2026-05-19 16:21:28 +08:00
bch include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
can arch/arm/src/at32/at32_can: Division by Zero in CAN Bit Timing Commands 2026-06-17 09:01:52 -03:00
clk drivers/clk: fix conflicting types in clk_register_* definitions 2026-06-18 21:52:33 +08:00
contactless drivers/contactless/pn532: Fix Stack Overflow in PN532 Contactless Driver 2026-06-14 18:53:21 +08:00
coresight style: fix checkpatch issues after debug.h move 2026-04-07 07:50:06 -03:00
crypto drivers/crypto: add Microchip RNG90 driver 2026-06-14 18:41:09 +08:00
devicetree include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
dma drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
dummy drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
eeprom drivers/eeprom/i2c_xx24xx: Integer Overflow in I2C EEPROM ee24xx_seek() 2026-06-18 08:58:22 -03:00
efuse include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
i2c drivers: Fix comment typos — 'register' → 'registered' across drivers. 2026-05-28 22:21:47 +08:00
i2s drivers: Fix comment typos — 'register' → 'registered' across drivers. 2026-05-28 22:21:47 +08:00
i3c drivers: Fix comment typos — 'register' → 'registered' across drivers. 2026-05-28 22:21:47 +08:00
input drivers/input/button_upper.c: Fix compilation with CONFIG_DISABLE_ALL_SIGNALS 2026-06-16 17:07:32 +08:00
ioexpander include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
ipcc include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
lcd !boards: Remove NSH_ARCHINIT and board_app_initialize 2026-05-02 18:36:46 +08:00
leds !drivers/pwm: remove PWM_MULTICHAN option 2026-05-18 11:35:25 -04:00
loop include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
math include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
misc !nuttx: drop redundant casts on tv_sec/tv_nsec and fix printf formats 2026-05-19 16:21:28 +08:00
mmcsd drivers/mmcsd/mmcsd_sdio.c: guard SDIO_REGISTERCALLBACK use 2026-06-04 09:31:56 -03:00
modem style: fix checkpatch issues after debug.h move 2026-04-07 07:50:06 -03:00
motor drivers: Fix comment typos — 'register' → 'registered' across drivers. 2026-05-28 22:21:47 +08:00
mtd drivers/mtd/gd25: add QSPI support 2026-06-21 09:43:29 -03:00
net drivers/net: Fix typo in lan9250_set_txavailable function name. 2026-05-29 09:43:20 +08:00
note !nuttx: drop redundant casts on tv_sec/tv_nsec and fix printf formats 2026-05-19 16:21:28 +08:00
pci include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
pinctrl drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
pipes include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
power !sys/types.h: change time_t and clock_t to int64_t to align with other OSes 2026-05-19 16:21:28 +08:00
rc drivers: Fix comment typos — 'register' → 'registered' across drivers. 2026-05-28 22:21:47 +08:00
regmap include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
reset include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
rf include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
rpmsg drivers/rpmsg: Fix typo rpmsg_device_destory -> rpmsg_device_destroy 2026-05-30 17:49:03 +08:00
rptun drivers/rptun: guard nxsched_waitpid with CONFIG_SCHED_WAITPID 2026-05-21 06:28:36 +08:00
segger drivers/segger: Download systemview from NuttX Mirror Repo 2026-06-03 19:19:24 +08:00
sensors drivers/sensors/adxl372_uorb.c: fix compilation error 2026-06-10 08:49:14 -03:00
serial drivers/serial: add job-control TTY ioctls and libc wrappers 2026-06-23 16:26:53 -03:00
spi drivers: Fix comment typos — 'register' → 'registered' across drivers. 2026-05-28 22:21:47 +08:00
syslog syslog: avoid an infinite loop if one channel fails 2026-06-23 22:45:01 +08:00
thermal include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
timers sched/clock/clock_delay: added config flag to remove weak up_udelay 2026-06-12 09:55:11 -04:00
usbdev include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
usbhost drivers/usbhost_hidmouse: fix button detection in touchscreen example 2026-05-22 10:38:25 +08:00
usbmisc include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
usbmonitor include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
usrsock include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
vhost include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
video video/fb: Handle case of multiple displays where some do not require update 2026-06-07 10:01:05 -03:00
virtio include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
wireless !sys/types.h: change time_t and clock_t to int64_t to align with other OSes 2026-05-19 16:21:28 +08:00
.gitignore
CMakeLists.txt drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
drivers_initialize.c serial/uart_rpmsg: add _raw version of driver 2026-02-23 09:19:57 -03:00
Kconfig espressif/rmt: replace rmtchar with arch-specific lirc adapter 2026-04-04 11:18:32 -03:00
Makefile docs/rc: document RC/LIRC drivers and remove empty drivers/rmt files 2026-04-04 11:18:32 -03:00