1 058b0118 2005-01-03 devnull .TH PLUMBER 4
3 058b0118 2005-01-03 devnull plumber \- file system for interprocess messaging
4 058b0118 2005-01-03 devnull .SH SYNOPSIS
5 058b0118 2005-01-03 devnull .B plumber
11 058b0118 2005-01-03 devnull .I plumbing
13 058b0118 2005-01-03 devnull .SH DESCRIPTION
15 058b0118 2005-01-03 devnull .I plumber
16 058b0118 2005-01-03 devnull is a user-level file server that receives, examines, rewrites, and dispatches
17 058b0118 2005-01-03 devnull .IR plumb (7)
18 058b0118 2005-01-03 devnull messages between programs.
19 058b0118 2005-01-03 devnull Its behavior is programmed by a
20 058b0118 2005-01-03 devnull .I plumbing
21 058b0118 2005-01-03 devnull file (default
22 c8b6342d 2005-01-13 devnull .BR $HOME/lib/plumbing )
23 058b0118 2005-01-03 devnull in the format of
24 058b0118 2005-01-03 devnull .IR plumb (7).
26 058b0118 2005-01-03 devnull Its services are posted via
27 058b0118 2005-01-03 devnull .IR 9pserve (4)
29 b0aecb4b 2019-10-29 crossd .BR plumb ,
30 058b0118 2005-01-03 devnull and consist of two
31 058b0118 2005-01-03 devnull pre-defined files,
32 058b0118 2005-01-03 devnull .B plumb/send
34 058b0118 2005-01-03 devnull .BR plumb/rules ,
35 058b0118 2005-01-03 devnull and a set of output
37 058b0118 2005-01-03 devnull for dispatching messages to applications.
39 058b0118 2005-01-03 devnull Programs use
40 058b0118 2005-01-03 devnull .B fswrite
42 058b0118 2005-01-03 devnull .IR 9pclient (3))
43 058b0118 2005-01-03 devnull to deliver messages to the
45 058b0118 2005-01-03 devnull file, and
46 058b0118 2005-01-03 devnull .I fsread
47 058b0118 2005-01-03 devnull to receive them from the corresponding port.
48 058b0118 2005-01-03 devnull For example,
49 058b0118 2005-01-03 devnull .IR sam (1)'s
51 058b0118 2005-01-03 devnull menu item or the
53 058b0118 2005-01-03 devnull command cause a message to be sent to
54 058b0118 2005-01-03 devnull .BR plumb/send ;
56 058b0118 2005-01-03 devnull in turn reads from, by convention,
57 058b0118 2005-01-03 devnull .B plumb/edit
58 058b0118 2005-01-03 devnull to receive messages about files to open.
60 058b0118 2005-01-03 devnull A copy of each message is sent to each client that has the corresponding port open.
61 058b0118 2005-01-03 devnull If none has it open, and the rule has a
63 058b0118 2005-01-03 devnull .B client
67 058b0118 2005-01-03 devnull rule, that rule is applied.
70 058b0118 2005-01-03 devnull .B client
71 058b0118 2005-01-03 devnull rule causes the specified command to be run
72 058b0118 2005-01-03 devnull and the message to be held for delivery when the port is opened.
76 058b0118 2005-01-03 devnull rule runs the command but discards the message.
77 058b0118 2005-01-03 devnull If neither
80 058b0118 2005-01-03 devnull .B client
81 058b0118 2005-01-03 devnull is specified and the port is not open,
82 058b0118 2005-01-03 devnull the message is discarded and a write error is returned to the sender.
84 058b0118 2005-01-03 devnull The set of output ports is determined dynamically by the
85 058b0118 2005-01-03 devnull specification in the plumbing rules file: a port is created for each unique
86 058b0118 2005-01-03 devnull destination of a
91 058b0118 2005-01-03 devnull The set of rules currently active may be examined by reading the file
92 058b0118 2005-01-03 devnull .BR plumb/rules ;
93 058b0118 2005-01-03 devnull appending to this file adds new rules to the set, while
94 058b0118 2005-01-03 devnull creating it (opening it with
95 058b0118 2005-01-03 devnull .BR OTRUNC )
96 058b0118 2005-01-03 devnull clears the rule set.
97 058b0118 2005-01-03 devnull Thus the rule set may be edited dynamically with a traditional text editor.
98 058b0118 2005-01-03 devnull However, ports are never deleted dynamically; if a new set of rules does not
99 058b0118 2005-01-03 devnull include a port that was defined in earlier rules, that port will still exist (although
100 058b0118 2005-01-03 devnull no new messages will be delivered there).
104 b0aecb4b 2019-10-29 crossd option causes the process to run in the foreground.
105 058b0118 2005-01-03 devnull .SH FILES
106 c8b6342d 2005-01-13 devnull .TF $HOME/lib/plumbing
108 c8b6342d 2005-01-13 devnull .B $HOME/lib/plumbing
109 058b0118 2005-01-03 devnull default rules file
111 c3674de4 2005-01-11 devnull .B \*9/plumb
112 058b0118 2005-01-03 devnull directory to search for files in
113 058b0118 2005-01-03 devnull .B include
114 058b0118 2005-01-03 devnull statements
116 058b0118 2005-01-03 devnull .B plumb
117 058b0118 2005-01-03 devnull mount name for
118 058b0118 2005-01-03 devnull .IR plumber (4).
119 058b0118 2005-01-03 devnull .SH SOURCE
120 c3674de4 2005-01-11 devnull .B \*9/src/cmd/plumb
121 058b0118 2005-01-03 devnull .SH "SEE ALSO"
122 058b0118 2005-01-03 devnull .IR plumb (1),
123 058b0118 2005-01-03 devnull .IR plumb (3),
124 058b0118 2005-01-03 devnull .IR plumb (7)
125 058b0118 2005-01-03 devnull .\" .SH BUGS
126 058b0118 2005-01-03 devnull .\" .IR Plumber 's
127 058b0118 2005-01-03 devnull .\" file name space is fixed, so it is difficult to plumb
128 058b0118 2005-01-03 devnull .\" messages that involve files in newly mounted services.