Commit graph

19 commits

Author SHA1 Message Date
Andrea Mazzoleni
463d858faf Move user and group resolution before fork for async-signal safety
Some checks are pending
Build / build-mac (push) Waiting to run
Build / build-linux (push) Waiting to run
Build / build-win (push) Waiting to run
CodeQL Advanced / Analyze (c-cpp) (push) Waiting to run
CodeQL Advanced / Analyze (actions) (push) Waiting to run
2026-08-16 09:49:40 +02:00
Andrea Mazzoleni
890d08c6dc Use monotonic clock in os_tick_ms and os_tick_sec on POSIX systems 2026-08-14 10:40:54 +02:00
Andrea Mazzoleni
a8a94bb950 Add os_usleep with bounded sleep loop returning on signal interruption and use it in bandwidth limiter 2026-08-14 09:39:36 +02:00
Andrea Mazzoleni
0032d2b6eb Use direct Linux setresuid/setresgid syscalls for thread-local privilege switching 2026-08-13 21:34:20 +02:00
Andrea Mazzoleni
ccc7d55286 Add O_CLOEXEC flag to open /dev/null in os_command and os_daemonize 2026-08-13 21:34:20 +02:00
Andrea Mazzoleni
6ac8d6a057 Fix os_wait return type mismatch in UNIX implementation 2026-08-13 21:34:20 +02:00
Andrea Mazzoleni
f908b122a5 Replace malloc with alloca in fork child exec path for async-signal safety 2026-08-10 13:26:29 +02:00
Andrea Mazzoleni
e1f6ddfe15 Comment explaining why CLOSE_RANGE_CLOEXEC is safe for fexecve binaries in os_spawn 2026-08-10 13:26:29 +02:00
Andrea Mazzoleni
78bcfaaa04 Guard lower close_range call with fd > 3 in os_exec_script 2026-08-10 11:23:15 +02:00
Andrea Mazzoleni
ae1fe46ea8 Replace VLA envp_dynamic with malloc in fork child exec path 2026-08-10 11:23:15 +02:00
Andrea Mazzoleni
2566ddbc69 Add fallback to kill(pid, sig) when process group signaling returns ESRCH in os_term and os_kill 2026-08-10 11:23:15 +02:00
Andrea Mazzoleni
58d75feea4 Configure PR_SET_PDEATHSIG on Linux and Job Objects on Windows to prevent orphaned subprocesses on program crash 2026-08-10 11:23:15 +02:00
Andrea Mazzoleni
cd39ccf752 Silence clang static analyzer warnings 2026-08-10 11:23:15 +02:00
Andrea Mazzoleni
9312712a28 Add new os_kill 2026-08-10 11:23:14 +02:00
Andrea Mazzoleni
baf6417a31 Make os_abort to log to os_syslog 2026-08-10 11:23:14 +02:00
Andrea Mazzoleni
2fbfbc1eae Sanitize addr2line binary path via strspn whitelist before system call 2026-08-10 11:23:14 +02:00
Andrea Mazzoleni
9098e1c4fd Sync the OS interface with the daemon 2026-08-10 11:23:14 +02:00
Andrea Mazzoleni
dfef6a363e Abort on privilege switch failures unless errno is EPERM 2026-08-10 11:23:13 +02:00
Andrea Mazzoleni
f19d00c93e Merge the CLI and Daemon portable interface 2026-08-10 11:23:13 +02:00