15 device provides a one-level directory holding
16 already-open channels to services.
19 is a bulletin board on which processes may post open file descriptors
20 to make them available to other processes.
22 To install a channel, create
25 and then write a text string (suitable for
29 giving the file descriptor number of an open file.
30 Any process may then open
32 to acquire another reference to the open file that was registered.
36 holds a reference to the associated file even if no process has the
37 file open. Removing the file from
39 releases that reference.
41 It is an error to write more than one number into a server file,
42 or to create a file with a name that is already being used.
44 To drop one end of a pipe into
46 that is, to create a named pipe:
53 fd = create("/srv/namedpipe", OWRITE, 0666);
54 fprint(fd, "%d", p[0]);
57 fprint(p[1], "hello");
60 At this point, any process may open and read
64 string. Data written to
66 can be received by executing
69 read(p[1], buf, sizeof buf);
74 .B /sys/src/9/port/devsrv.c