From 5dbc46f3c1c75bf922bcc1c3df342323c23c04ce Mon Sep 17 00:00:00 2001 From: James O'Doherty Date: Fri, 22 May 2026 10:14:03 -0400 Subject: docs: update README and AGENTS.md to reflect embedded launcher architecture --- internal/namespace/launcher_src/launcher.c | 11 +++++++---- internal/namespace/namespace.go | 5 ----- 2 files changed, 7 insertions(+), 9 deletions(-) (limited to 'internal') diff --git a/internal/namespace/launcher_src/launcher.c b/internal/namespace/launcher_src/launcher.c index 70737e4..63dd6ff 100644 --- a/internal/namespace/launcher_src/launcher.c +++ b/internal/namespace/launcher_src/launcher.c @@ -69,9 +69,12 @@ int main(int argc, char **argv) { return 1; } - fprintf(stderr, "[launcher] Executing binary: %s\n", argv[0]); - execvp(argv[0], argv); + // Use execv instead of execvp to avoid PATH search issues + // since we are providing an absolute path from Go. + if (execv(argv[0], argv) == -1) { + perror("execv failed"); + return 1; + } - perror("execvp"); - return 1; + return 0; } diff --git a/internal/namespace/namespace.go b/internal/namespace/namespace.go index 98d73b6..5e31b9d 100644 --- a/internal/namespace/namespace.go +++ b/internal/namespace/namespace.go @@ -84,14 +84,9 @@ func Bootstrap() error { // 3. Prepare arguments for the launcher. // The launcher expects: launcher [args...] - // syscall.Exec's second argument is the argv array. - // argv[0] is set by the kernel to the launcherPath. - // So our first slice element becomes argv[1]. args := []string{self} args = append(args, os.Args[1:]...) - fmt.Printf("[bootstrap] Execing launcher with args: %v\n", args) - // 4. Replace the current process with the launcher. err = syscall.Exec(launcherPath, args, os.Environ()) if err != nil { -- cgit v1.2.3