Commit graph

37 commits

Author SHA1 Message Date
Andrea Mazzoleni
fdce9738e8 Document Windows Ctrl-Break termination semantics in os_term() 2026-08-18 23:33:59 +02:00
Andrea Mazzoleni
b3dc7e55c1 Use dedicated scriptcat() for cmd.exe batch parameter serialization in os_script() 2026-08-18 23:33:58 +02:00
Andrea Mazzoleni
576873f0f9 Use tv[1] as mtime in Windows futimens and utimensat emulation 2026-08-18 23:33:58 +02:00
Andrea Mazzoleni
3c88559379 Quote empty arguments in Windows command line generation 2026-08-18 23:33:58 +02:00
Andrea Mazzoleni
bd856b456b Fix undefined _linux macro typo to __linux__ 2026-08-18 23:33:58 +02:00
Andrea Mazzoleni
4ec28b4b58 Redirect uncaptured stdio streams to NUL in os_spawn on Windows 2026-08-18 23:33:58 +02:00
Andrea Mazzoleni
87977f28f4 Harden PowerShell execution with safe SearchPathW and os_spawn 2026-08-18 23:33:58 +02:00
Andrea Mazzoleni
fd09e72816 Add buffer bounds check before appending wildcard in windows_opendir_find 2026-08-18 23:33:58 +02:00
Andrea Mazzoleni
f48e406d52 Convert extended UNC paths to standard UNC format in windows_realpath 2026-08-18 23:33:58 +02:00
Andrea Mazzoleni
f9626f6e3e Normalize negative pre-1970 FILETIME timestamps via windows_time2stat 2026-08-18 23:33:58 +02:00
Andrea Mazzoleni
caeb3a9d1b Fix PrintNameOffset WCHAR index scaling and add bounds validation in windows_readlink 2026-08-18 23:33:58 +02:00
Andrea Mazzoleni
3c1772d478 Move user and group resolution before fork for async-signal safety 2026-08-18 23:33:58 +02:00
Andrea Mazzoleni
fa8913a759 Use monotonic clock in os_tick_ms and os_tick_sec on POSIX systems 2026-08-18 23:33:58 +02:00
Andrea Mazzoleni
daf713820e Add os_usleep with bounded sleep loop returning on signal interruption and use it in bandwidth limiter 2026-08-18 23:33:57 +02:00
Andrea Mazzoleni
170759e83c Use direct Linux setresuid/setresgid syscalls for thread-local privilege switching 2026-08-18 23:33:57 +02:00
Andrea Mazzoleni
6b3b60bf87 Add O_CLOEXEC flag to open /dev/null in os_command and os_daemonize 2026-08-18 23:33:57 +02:00
Andrea Mazzoleni
03831386f0 Fix os_wait return type mismatch in UNIX implementation 2026-08-18 23:33:57 +02:00
Andrea Mazzoleni
e44fb81da2 Modernize configure.ac 2026-08-18 23:33:57 +02:00
Andrea Mazzoleni
84297fc6dc Replace malloc with alloca in fork child exec path for async-signal safety 2026-08-18 23:33:57 +02:00
Andrea Mazzoleni
19173754ec Comment explaining why CLOSE_RANGE_CLOEXEC is safe for fexecve binaries in os_spawn 2026-08-18 23:33:57 +02:00
Andrea Mazzoleni
f818d9426b Remove libblkid support and build dependency 2026-08-18 23:33:57 +02:00
Andrea Mazzoleni
2b71f5727e Guard lower close_range call with fd > 3 in os_exec_script 2026-08-18 23:33:56 +02:00
Andrea Mazzoleni
acdf29ac09 Replace VLA envp_dynamic with malloc in fork child exec path 2026-08-18 23:33:56 +02:00
Andrea Mazzoleni
6c85573d12 Add comments explaining Windows Service console attachment flow in os_term 2026-08-18 23:33:56 +02:00
Andrea Mazzoleni
f67bf49c91 Comment about process resource in os_term/os_kill on Windows 2026-08-18 23:33:56 +02:00
Andrea Mazzoleni
b3fdc8d6a5 Add fallback to kill(pid, sig) when process group signaling returns ESRCH in os_term and os_kill 2026-08-18 23:33:56 +02:00
Andrea Mazzoleni
6b46e08a1f Configure PR_SET_PDEATHSIG on Linux and Job Objects on Windows to prevent orphaned subprocesses on program crash 2026-08-18 23:33:56 +02:00
Andrea Mazzoleni
0ca7c65049 Support filesystems with invalid inode numbers on individual files 2026-08-18 23:33:56 +02:00
Andrea Mazzoleni
3878c0e2e6 Silence clang static analyzer warnings 2026-08-18 23:33:56 +02:00
Andrea Mazzoleni
76124cff00 Add bounded retry with exponential backoff for ERROR_NO_SYSTEM_RESOURCES 2026-08-18 23:33:56 +02:00
Andrea Mazzoleni
1b1ae7cce9 Add new os_kill 2026-08-18 23:33:56 +02:00
Andrea Mazzoleni
e191127b0d Add CREATE_NO_WINDOW flag to process creation in os_spawn 2026-08-18 23:33:56 +02:00
Andrea Mazzoleni
180278fbb4 Make os_abort to log to os_syslog 2026-08-18 23:33:56 +02:00
Andrea Mazzoleni
effc3be9c2 Sanitize addr2line binary path via strspn whitelist before system call 2026-08-18 23:33:55 +02:00
Andrea Mazzoleni
d6b51d61e7 Sync the OS interface with the daemon 2026-08-18 23:33:55 +02:00
Andrea Mazzoleni
056a037761 Abort on privilege switch failures unless errno is EPERM 2026-08-18 23:33:55 +02:00
Andrea Mazzoleni
00b4cbafd0 Merge the CLI and Daemon portable interface 2026-08-18 23:33:55 +02:00