1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
//! What [`shim`](crate::shim) is on a platform without ptys.
//!
//! The real module runs an agent on a pty cctop owns and serves it over a unix
//! socket, so a tab can draw it and type into it. Both halves of that are unix:
//! raw `openpty`/`TIOCSWINSZ` ioctls, `CommandExt`, `UnixListener`. There is a
//! Windows equivalent — ConPTY and named pipes — but it is a port of the whole
//! feature rather than a shim over it, and nothing in the dashboard needs it.
//!
//! So Windows gets the surface and not the behaviour, the same bargain
//! [`attach`](crate::attach) already makes: hosting fails with a message that
//! says why, and nothing is ever running to enumerate. The session table, which
//! is what cctop is for, reads transcripts and process lists and does not care.
//!
//! Kept in step with the real module by the compiler, in both directions. Every
//! item here exists because something outside calls it *unconditionally*, and
//! nothing else may be here: `run`, `sessions` and `socket_path` are part of the
//! real surface but every caller of theirs is unix- or linux-gated, so a
//! courtesy stub of them would be a function with no callers — which is dead
//! code, which CI's `-D warnings` makes a build failure.
use PathBuf;
/// Stands in for a hosted agent, which this platform never has.
///
/// Constructible only by [`host`], which always fails, so the fields are only
/// ever read through a value that cannot exist. They are here because the
/// callers name them.
/// Start an agent in a tab. See the module docs for why this cannot.
/// Whether `word` names something runnable.
///
/// Real, unlike the rest of this module: it decides which agents the launcher
/// offers, and a wrong answer there is a wrong list rather than a failed
/// launch. Windows has no executable bit, so the extension does that job —
/// `PATHEXT` is the list of suffixes the shell would try, and a word that
/// already carries one is taken as given.