feat: add cwd tracking to kernel, remove shell hack, update system utilities to use getcwd, fix tcc libc stub, fix nonexistent directory issue

This commit is contained in:
2026-03-25 15:45:22 +01:00
parent 9c9a0a9712
commit ea087769f5
22 changed files with 389 additions and 265 deletions
+5 -1
View File
@@ -11,11 +11,15 @@
#include "Syscall.hpp"
#include "Common.hpp"
#include "Path.hpp"
namespace Montauk {
static int Sys_SpawnRedir(const char* path, const char* args) {
int childPid = Sched::Spawn(path, args);
char resolved[256];
if (!ResolveProcessPath(path, resolved, sizeof(resolved))) return -1;
int childPid = Sched::Spawn(resolved, args);
if (childPid < 0) return -1;
auto* child = Sched::GetProcessByPid(childPid);