szn

Bug 95 — Daemon fork doesn’t close stdin/stdout/stderr

95. Daemon fork doesn’t close stdin/stdout/stderr

File: src/main.zig:170–175 Severity: LOW Status: ✅ FIXED — close(0), close(1), close(2) then reopen via open(“/dev/null”) + dup2 at start of runServerDaemon.

if (pid == 0) {
    if (log_fd) |fd| {
        _ = c.close(fd);
        log_fd = null;
    }
    try runServerDaemon(allocator);

After fork(), the child process has setsid() called but stdin/stdout/stderr are never closed or redirected to /dev/null. The daemon retains fds pointing to the original terminal.