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
//! **What `thrall run` does**: read this box, and serve every channel it holds
//! until they have all stopped.
//!
//! Three reads and one loop, and the order is the point. **The config first**,
//! because a box with nothing to offer has nothing to do and no reason to dial
//! anything. **Then the channels**, because a box with nothing to dial has
//! nothing to offer them to. Only then the loop, which does not return while
//! any channel is up.
//!
//! **There is no success exit, so none is spelled.** Every answer here is a
//! [`Verdict::failed`]: either this box could not start, or every channel it
//! held has stopped and the sentences that stopped them are the answer. A foot
//! that returned zero would be saying it had finished, and a foot is never
//! finished — it is either serving or stopped.
//!
//! **A channel is dialled again; a process is not restarted** (DESIGN §3.8,
//! REMOTE §5.3). Each channel takes itself up again after a drop, so what
//! reaches this file is the ending that asking again cannot improve — and a box
//! whose every channel has ended that way is a foot that cannot be a foot,
//! which is where the supervision the operator's machine already has takes
//! over.
//!
//! **The exit sentence is a summary and never the report** (bl-e834). Every
//! channel says its own ending through `notice` at the moment it ends — the
//! retryable ones with the wait beside them, the terminal one under the same
//! name and in the same words this file joins — so an operator hears the first
//! death when it happens rather than when the last sibling stops. What is
//! joined here is what the process exits with, which is a different question
//! from what it says while it is alive.
use Path;
use crateentries;
use crate;
use crateVerdict;
use crate::;
/// Serve the box rooted at `root`, saying anything a channel raises while it
/// is still serving through `notice`.
///
/// **The sink and the pause are parameters for the same reason the executor
/// is** (`run`): a serving foot's notices go to this process's stderr and its
/// waits are real sleeps, both effects and neither a value, so both live in
/// `src/main.rs` and every test here reads them back instead.
/// What a box with a tool document and no channel is told.
///
/// It names the shape rather than a command, because there is no command: the
/// material is minted on the box that holds the operator's CA and carried here
/// by hand (REMOTE §1.4). A remedy thrall could run would be a bootstrap flow,
/// and a foot that could provision itself over the wire would be a foot any
/// wire could provision.