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

+30
View File
@@ -112,6 +112,11 @@ typedef void (*SYS_USER_APC_ROUTINE)(void* normalContext,
SYS_IO_STATUS_BLOCK* iosb,
uint64_t information);
// Generic user APC callback shape used by capability-scoped direct notifications.
typedef void (*SYS_USER_APC_CALLBACK)(void* normalContext,
void* systemArgument1,
void* systemArgument2);
typedef struct SYS_FILE_IO_REQUEST {
uint32_t Size;
SYS_HANDLE FileHandle;
@@ -663,6 +668,25 @@ typedef struct SYS_CREATE_THREAD_REQUEST {
#define SYS_CREATE_THREAD_FLAG_NONE 0x00000000u
#define SYS_CREATE_THREAD_FLAG_SUSPENDED 0x00000001u
// Describes one generic user APC queued through a thread capability. The
// routine and arguments are interpreted in the target thread's user address
// space; possession of SYS_THREAD_RIGHT_NOTIFY is the authority boundary.
// INTERRUPT permits delivery on the next user return without requiring an
// alertable wait; ordinary APCs retain alertable-wait delivery semantics.
#define SYS_QUEUE_USER_APC_FLAG_NONE 0x00000000u
#define SYS_QUEUE_USER_APC_FLAG_INTERRUPT 0x00000001u
typedef struct SYS_QUEUE_USER_APC_REQUEST {
uint32_t Size;
SYS_HANDLE ThreadHandle;
SYS_USER_APC_CALLBACK Routine;
void* NormalContext;
void* SystemArgument1;
void* SystemArgument2;
uint32_t Flags;
uint32_t Reserved;
} SYS_QUEUE_USER_APC_REQUEST;
void SysExitProcess(int32_t exitCode);
void SysExitThread(int32_t exitCode);
KSTATUS SysCreateProcessObject(const SYS_CREATE_PROCESS_OBJECT_REQUEST* request);
@@ -813,9 +837,12 @@ typedef struct SYS_PROCESS_INFO {
KSTATUS SysGetProcessList(SYS_PROCESS_INFO* processesOut, size_t maxCount, size_t* countOut);
KSTATUS SysGetProcessPid(SYS_HANDLE handle, uint32_t* pidOut);
KSTATUS SysGetThreadList(uint32_t pid, SYS_THREAD_INFO* threadsOut, size_t maxCount, size_t* countOut);
KSTATUS SysGetThreadTid(SYS_HANDLE handle, uint32_t* tidOut);
KSTATUS SysCreateThread(const SYS_CREATE_THREAD_REQUEST* request);
KSTATUS SysOpenCurrentThread(SYS_RIGHTS desiredAccess, SYS_HANDLE* handleOut);
KSTATUS SysResumeThread(SYS_HANDLE threadHandle, uint32_t* previousSuspendCountOut);
KSTATUS SysResumeThreadAndWait(SYS_HANDLE threadHandle, uint32_t* previousSuspendCountOut);
uint32_t SysGetCurrentTid(void);
uint32_t SysGetCurrentPid(void);
KSTATUS SysSetThreadPriority(uint32_t priority);
@@ -845,6 +872,7 @@ KSTATUS SysCancelTimer(SYS_HANDLE timerHandle);
// waitable timer handles. A zero-length sleep yields the processor.
KSTATUS SysSleep(uint64_t ms);
KSTATUS SysSetUserApcDispatcher(void* dispatcher);
KSTATUS SysQueueUserApc(const SYS_QUEUE_USER_APC_REQUEST* request);
// Returns from the active user APC dispatcher. The frame pointer must identify
// the kernel-issued frame for the current delivery; it is not a general resume
@@ -982,6 +1010,8 @@ KSTATUS SysReceivePort(const SYS_RECEIVE_PORT_REQUEST* request);
KSTATUS SysCallPort(const SYS_CALL_PORT_REQUEST* request);
KSTATUS SysReplyPort(const SYS_REPLY_PORT_REQUEST* request);
KSTATUS SysDisconnectPort(SYS_HANDLE endpointHandle);
KSTATUS SysOpenPortPeerProcess(SYS_HANDLE endpointHandle, SYS_RIGHTS desiredRights,
SYS_HANDLE* processHandleOut);
KSTATUS SysRegisterSystemService(SYS_SERVICE_ID serviceId, SYS_HANDLE listenerHandle);
KSTATUS SysUnregisterSystemService(SYS_SERVICE_ID serviceId, SYS_HANDLE listenerHandle);
KSTATUS SysConnectSystemService(const SYS_CONNECT_SYSTEM_SERVICE_REQUEST* request);