srv man page on Plan9

Man page or keyword search:  
man Server   549 pages
apropos Keyword Search (all sections)
Output format
Plan9 logo
[printable version]

SRV(3)									SRV(3)

       srv - server registry

       bind #s /srv


       The  srv	 device	 provides  a  one-level directory holding already-open
       channels to services.  In effect, srv is a bulletin board on which pro‐
       cesses  may  post open file descriptors to make them available to other

       To install a channel, create a new file such as	/srv/myserv  and  then
       write a text string (suitable for strtoul; see atof(2)) giving the file
       descriptor  number  of  an  open	 file.	 Any  process  may  then  open
       /srv/myserv to acquire another reference to the open file that was reg‐

       An entry in srv holds a reference to the associated  file  even	if  no
       process	has  the file open.  Removing the file from /srv releases that

       It is an error to write more than one number into a server file, or  to
       create a file with a name that is already being used.

       To drop one end of a pipe into /srv, that is, to create a named pipe:

	      int fd, p[2];
	      char buf[32];

	      fd = create("/srv/namedpipe", OWRITE, 0666);
	      fprint(fd, "%d", p[0]);
	      fprint(p[1], "hello");

       At  this point, any process may open and read /srv/namedpipe to receive
       the hello string.  Data written to /srv/namedpipe can  be  received  by

	      read(p[1], buf, sizeof buf);

       in the above process.


                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server Plan9

List of man pages available for Plan9

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
Vote for polarhome
Free Shell Accounts :: the biggest list on the net