SchOS/kernel/sys
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Nexoniarz 8351e0323b kernel: HTTPS through wget, half-close, and /proc/<pid>/fd
busybox wget hands TLS to ssl_client over a socketpair and then does
shutdown(SHUT_WR). That cut the AF_UNIX link both ways, so ssl_client's
reply was a SIGPIPE and every https:// download hung. SHUT_WR is now a
half-close: the peer reads EOF and can still answer. TCP sockets get
shutdown() at all (tcp_shutdown for the FIN); it used to do nothing.

- exec keeps ignored signals and the signal mask, as execve(2) says.
- /proc/<pid>/fd: a link per descriptor -- the path it was opened by,
  socket:[n], pipe:[n], anon_inode:[eventpoll]. /proc/self too. The
  global inode bit moves above pid << 8; at 0x10000 it was /proc/256.
- fstat on a socket or pipe answers S_IFSOCK / S_IFIFO instead of EINVAL.
- poll, select and epoll wake as soon as a pipe, socket or input device
  changes, not on the next tick.
- Pipes are 64 KB of lazily allocated pages, copied in blocks, with
  PIPE_BUF atomicity: 300 MB through `yes | head | wc` in 7 s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S1giNvrHTrPMPw7V6x1kQ4
2026-10-24 20:28:03 +02:00
..
linux_abi.c include: one folder per subsystem, and includes that name it 2026-10-23 15:05:12 +02:00
sys_compat.c epoll, eventfd, timerfd, signalfd 2026-10-24 10:59:52 +02:00
sys_event.c kernel: HTTPS through wget, half-close, and /proc/<pid>/fd 2026-10-24 20:28:03 +02:00
sys_fs.c kernel: HTTPS through wget, half-close, and /proc/<pid>/fd 2026-10-24 20:28:03 +02:00
sys_mem.c kernel: chroot, #! scripts, rename and mmap as apk needs them 2026-10-24 15:28:32 +02:00
sys_net.c kernel: HTTPS through wget, half-close, and /proc/<pid>/fd 2026-10-24 20:28:03 +02:00
sys_poll.c kernel: HTTPS through wget, half-close, and /proc/<pid>/fd 2026-10-24 20:28:03 +02:00
sys_proc.c include: one folder per subsystem, and includes that name it 2026-10-23 15:05:12 +02:00
sys_sig.c signals: a blocked signal stays pending instead of killing 2026-10-24 10:59:52 +02:00
sys_time.c kernel: timers that fire, raw ping, and the sockets X needs 2026-10-24 19:44:10 +02:00
syscall.c include: one folder per subsystem, and includes that name it 2026-10-23 15:05:12 +02:00
table.inc kernel: timers that fire, raw ping, and the sockets X needs 2026-10-24 19:44:10 +02:00