From 4478e94b65c411cbb524f0334cbf8bfce42b336d Mon Sep 17 00:00:00 2001 From: Viorel Munteanu Date: Mon, 17 Aug 2026 07:52:49 +0000 Subject: [PATCH] Drop --new-session from bwrap args, breaks foreground tty It detaches the sandboxed process from the controlling terminal, so an interactive /bin/sh fails with "can't access tty; job control turned off." Re-add it once background/daemonized runs land, where detaching from the terminal is actually the point. Co-Authored-By: Claude Sonnet 5 --- src/bwrap.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bwrap.cpp b/src/bwrap.cpp index 7a138a2..f9eeffb 100644 --- a/src/bwrap.cpp +++ b/src/bwrap.cpp @@ -125,7 +125,10 @@ std::vector detect_bwrap_unshare_args() { std::vector build_bwrap_args(const std::string& root, const std::vector& command) { - std::vector args = {"bwrap", "--die-with-parent", "--new-session"}; + // --new-session detaches from the controlling terminal, which breaks job + // control for an interactive foreground shell ("can't access tty"). Re-enable + // once background/daemonized runs are implemented, where that's the point. + std::vector args = {"bwrap", "--die-with-parent"}; auto unshare_args = detect_bwrap_unshare_args(); bool has_pid_ns = false;