diff options
Diffstat (limited to 'src/exec.zig')
| -rw-r--r-- | src/exec.zig | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/src/exec.zig b/src/exec.zig index af312c45..ad051c32 100644 --- a/src/exec.zig +++ b/src/exec.zig @@ -43,10 +43,6 @@ pub fn takesCommandLine(p: *const Pardes, id: usize) bool { // (Text in pardes's own edit buffer is not the shell's yet: an exec of // it, or of anything, types only what it runs.) if (panes.terminal.promptInputReady(pane) and !panes.terminal.promptInputEmpty(pane)) return false; - // A mounted shell sits behind sudo's process supervisor. Its OSC 133 - // prompt marks identify input readiness; the launcher's executable is - // not the shell executable used by the ordinary process heuristic. - if (pane.v9fs_on_spawn) return panes.terminal.promptInputReady(pane); return !p.hostTtyTaken(id); } @@ -405,29 +401,6 @@ fn askWrite(p: *Pardes, id: usize, serial: u32, path: []const u8) void { /// Tty: a shell in the caller's directory, raw from the first frame, /// stacked below the caller like Alt-n's new shell. pub fn spawnTty(p: *Pardes, from: usize) ?*Pane { - return spawnTtyWithMount(p, from, false); -} - -pub fn spawnV9fsTty(p: *Pardes, from: usize) void { - if (comptime !hosted) return p.reportError(from, "Tty9p", error.LinuxRequired); - // The session's host's and its 9P server's: a replica, of another - // build too (a Linux client of a FreeBSD session), has their answers. - if (!pardes.tape.authority(onLinux, .{})) - return p.reportError(from, "Tty9p", error.LinuxRequired); - if (!pardes.tape.authority(servesSocket, .{p})) - return p.reportError(from, "Tty9p", error.SessionSocketRequired); - _ = spawnTtyWithMount(p, from, true); -} - -fn onLinux() bool { - return @import("builtin").os.tag == .linux; -} - -fn servesSocket(p: *Pardes) bool { - return p.fs.socket_path.len != 0; -} - -fn spawnTtyWithMount(p: *Pardes, from: usize, v9fs: bool) ?*Pane { // No pane asking (an empty window's tag): the session's directory, as // New's scratch is. // A directory that is not there makes no terminal: its shell could not @@ -451,8 +424,7 @@ fn spawnTtyWithMount(p: *Pardes, from: usize, v9fs: bool) ?*Pane { p.reportError(from, "Tty", err); return null; }; - nt.greet = !v9fs; - nt.v9fs_on_spawn = v9fs; + nt.greet = true; nt.body.mode = .tty; placeNew(p, from, from, free, .shell); if (refusedPlacement(p, free)) { |
