3 intro \- introduction to file servers
7 provides a file tree to processes.
8 This section of the manual describes servers that can be
9 mounted in a name space to give a file-like interface to interesting services.
10 A file server may be a provider of a conventional file system,
11 with files maintained on permanent storage,
12 or it may also be a process that synthesizes files in some manner.
14 In Plan 9, the kernel mount device
16 acts as a client to the 9P servers mounted in the current name space,
17 translating system calls such as
19 into 9P transactions such as
21 The kernel also multiplexes the potentially many processes onto a single 9P conversation
23 Finally, the kernel provides each process with its own private
25 which it can customize at will.
26 Modern Unix systems do not provide these niceties, so
27 the Unix port of these Plan 9 file servers provides them via other means.
29 On Unix, 9P clients do not access servers via the traditional
30 file system call interface. Only the Unix name space can be accessed
32 Instead, 9P clients use the
34 library to connect and interact directly with particular 9P servers.
37 command-line client is useful for interactive use and in shell scripts.
39 To preserve the façade of a single 9P conversation with each server,
43 .IR post9pservice (3).
45 announces a 9P service at a particular
46 network address and multiplexes the clients that connect to
47 that address onto a single 9P conversation with the server.
49 Each ported program operates in a pseudo-name space
50 that determines which 9P servers it is using.
51 The name space of a ported program is represented by a
52 directory containing Unix domain sockets, one for each 9P server.
53 The directory defaults to
54 .BR /tmp/ns.$USER.$DISPLAY ,
55 meaning that all programs in an X Windows login session
56 share a single name space.
59 environment variable overrides this default.
62 command prints the current name space directory.
64 Occasionally it is useful to be able to connect the input or output
65 of a standard Unix program to a file served by a 9P server.
68 9P transaction, which depends on file descriptor passing,
69 provides a sufficient workaround in many cases.
77 returns the read or write end of a pipe;
78 a helper process transfers data between the other end of the pipe
80 Note that since the data is being transferred via a pipe,
81 9P read and write errors cannot be passed on to the Unix program.
82 The Unix program sees only end-of-file or a closed pipe.