move POSIX spawn, exec and child tracking into posixsrv, keep process transactions alive across reconnects and preserve stable PIDs across image replacement, flesh out spawn with ordered file actions, process-group selection and signal inheritance, implement execve with bootstrap validation and rollback before retiring the old process, add vfork children that share the native process while keeping separate POSIX descriptor and signal state, replace local spawn bookkeeping with child reaping, nonblocking and process-group waits and orphan cleanup, add signal dispositions, per-thread masks, pending delivery, process/group signalling and alarms, translate native exceptions into POSIX signals and inherit masks when creating threads, make pipe waits interruptible and raise SIGPIPE for broken pipes, pass arguments and environment into main and add getenv/environ, add direct user APC notifications that can run without an alertable wait, add current-thread capabilities and resume-and-wait, let accepted IPC endpoints open restricted peer process capabilities and preserve caller security during spawn and exec, make process preparation reusable and improve DLL lookup across current, executable and fallback directories, move keyboard repeat into RSSRV so PS/2 and USB share one repeat policy, fix video presentation, report launch failure stages and status codes, mooaaar tests.

This commit is contained in:
maksw committed 2026-09-23 09:39:42 +02:00
1 parent 73abd6f90d
commit 899225f551
57 files changed
+8817 -1216

No files matched your search

@@ -0,0 +1,37 @@
// Shared layout for the x64 vfork continuation context.
#pragma once
#include <stdint.h>
#include <stddef.h>
#include <ntlite/syscall.h>
#include "posix_internal.h"
typedef struct POSIX_VFORK_CONTEXT {
uint64_t ReturnAddress;
uint64_t ParentRsp;
uint64_t Rbx;
uint64_t Rbp;
uint64_t Rsi;
uint64_t Rdi;
uint64_t R12;
uint64_t R13;
uint64_t R14;
uint64_t R15;
uint8_t Xmm[10][16];
uint32_t Mxcsr;
uint16_t X87Control;
uint16_t Reserved;
POSIX_VFORK_CHILD_STATE* Child;
SYS_HANDLE ThreadHandle;
uint32_t ChildPid;
uint32_t PreviousSuspendCount;
volatile uint32_t ChildAttached;
volatile KSTATUS ChildAttachStatus;
uint32_t Reserved2;
} POSIX_VFORK_CONTEXT;
POSIX_VFORK_CONTEXT* PosixVforkPrepare(const POSIX_VFORK_CONTEXT* captured);
void PosixVforkChildBootstrap(uintptr_t argument);
int PosixVforkParentFinish(POSIX_VFORK_CONTEXT* context, KSTATUS waitStatus);
void PosixVforkEnterChild(POSIX_VFORK_CONTEXT* context);