feat: implemented reparenting for backgrounded wrappers

- Introduce `detach_reparent` parameter to command execution to support process reparenting.
- Add `detach_session_reparent` to Unix command extensions using a double-fork technique to orphan processes from the shell descendant tree.
- Update background pipeline logic to automatically apply reparenting when unwrapping transparent wrappers like `nohup`.
- Remove unused `command_is_resolvable` helper.
This commit is contained in:
can1357
2026-06-23 08:06:54 +02:00
parent c6fcc155a2
commit 00dcd54597
7 changed files with 96 additions and 46 deletions
@@ -53,7 +53,9 @@ async function main(): Promise<void> {
await runCommand(["bun", "scripts/generate-docs-index.ts", "--generate"]);
await runCommand(
["bun", "--cwd=../natives", "run", "embed:native"],
crossTarget ? { ...Bun.env, TARGET_PLATFORM: crossPlatform as string, TARGET_ARCH: crossArch as string } : Bun.env,
crossTarget
? { ...Bun.env, TARGET_PLATFORM: crossPlatform as string, TARGET_ARCH: crossArch as string }
: Bun.env,
);
await runCommand(["bun", "scripts/embed-mupdf-wasm.ts", "--generate"]);
try {