3 plumber \- file system for interprocess messaging
13 is a user-level file server that receives, examines, rewrites, and dispatches
15 messages between programs.
16 Its behavior is programmed by a
19 .BR /usr/$user/lib/plumbing )
23 Its services are mounted on the directory
25 .RB ( /mnt/term/mnt/plumb
26 on the CPU server) and consist of two
33 for dispatching messages to applications.
34 The service is also published as a
38 for mounting elsewhere.
44 to deliver messages to the
48 to receive them from the corresponding port.
54 command cause a message to be sent to
57 in turn reads from, by convention,
59 to receive messages about files to open.
61 A copy of each message is sent to each client that has the corresponding port open.
62 If none has it open, and the rule has a
68 rule, that rule is applied.
72 rule causes the specified command to be run
73 and the message to be held for delivery when the port is opened.
77 rule runs the command but discards the message.
82 is specified and the port is not open,
83 the message is discarded and a write error is returned to the sender.
85 The set of output ports is determined dynamically by the
86 specification in the plumbing rules file: a port is created for each unique
92 The set of rules currently active may be examined by reading the file
93 .BR /mnt/plumb/rules ;
94 appending to this file adds new rules to the set, while
95 creating it (opening it with
98 Thus the rule set may be edited dynamically with a traditional text editor.
99 However, ports are never deleted dynamically; if a new set of rules does not
100 include a port that was defined in earlier rules, that port will still exist (although
101 no new messages will be delivered there).
103 .TF /usr/$user/lib/plumbing
105 .B /usr/$user/lib/plumbing
109 directory to search for files in
117 .B /sys/src/cmd/plumb
124 file name space is fixed, so it is difficult to plumb
125 messages that involve files in newly mounted services.