Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

srv(3) [plan9 man page]

SRV(3)							     Library Functions Manual							    SRV(3)

NAME
srv - server registry SYNOPSIS
bind #s /srv #s/service1 #s/service2 ... DESCRIPTION
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 processes. 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- istered. 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 reference. 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. EXAMPLE
To drop one end of a pipe into /srv, that is, to create a named pipe: int fd, p[2]; char buf[32]; pipe(p); fd = create("/srv/namedpipe", 1, 0666); sprint(buf, "%d", p[0]); write(fd, buf, strlen(buf)); close(fd); close(p[0]); write(p[1], "hello", 5); At this point, any process may open and read /srv/namedpipe to receive the hello string. Data written to /srv/namedpipe will be received by executing read(p[1], buf, sizeof buf); in the above process. SOURCE
/sys/src/9/port/devsrv.c SRV(3)

Check Out this Related Man Page

BBDB-SRV.PL(1)						      General Commands Manual						    BBDB-SRV.PL(1)

NAME
bbdb-srv - Converts Mail-Headers to an Emacs-Lisp String. SYNOPSIS
echo Some Headers | bbdb-srv DESCRIPTION
This script reads a block of message headers on stdin, and converts them to an emacs-lisp string (quoting all dangerous characters) and then uses the `gnudoit' program to cause a running Emacs process to invoke the `bbdb-srv' function with that string. This has the effect of causing the running Emacs to display the BBDB record corresponding to these headers. See the Emacs side of things in bbdb-srv.el for more info. A trivial application of this is the shell command: echo 'From: Jamie Zawinski <jwz@netscape.com>' | bbdb-srv.perl which will cause the corresponding record to be displayed. A more interesting application of this is: setenv NS_MSG_DISPLAY_HOOK bbdb-srv.perl which will hook BBDB up to Mozilla (Unix Netscape Mail and Netscape News versions 3.0b2 and later only.) This manual page was written for the Debian distribution because the original program does not have a manual page. Instead, it has docu- mentation in the GNU Info format; see below. SEE ALSO
bbdb-areacode-split(1), bbdb-unlazy-lock(1). bbdb-srv(1). The bbdb is fully documented by The insidious Big Brother Database for mail and news, available via the Infonode bbdb AUTHOR
This manual page was written by Joerg Jaspert (JJ) <joerg@goliathbbs.dnsalias.net>, for the Debian GNU/Linux system (but may be used by others). March 31, 2002 BBDB-SRV.PL(1)
Man Page

15 More Discussions You Might Find Interesting

1. Programming

File Descriptors

Hi, I have written a daemon process, to perform certain operations in the background. For this I have to close, the open file descriptors, Does anybody know how to find out the number of open file descriptors ? Thanks in Advance, Sheetal (2 Replies)
Discussion started by: s_chordia
2 Replies

2. Filesystems, Disks and Memory

Removing ".nfs" files

Hello, I have a critical client-server application. I try to import a file from the local machine on to the server and open it (on the server). I can open it, but after this, when i try to open some other file on the server itself without saving this imported file, a .nfs file is being created.... (1 Reply)
Discussion started by: Jayathirtha
1 Replies

3. Shell Programming and Scripting

Performing an open/read, open/write

I'm trying to do two different things (converting an OpenVms .com to a ksh shell script): 1) open/read/err= 2) open/write/err= Any help? I've found some things, but can't seem to find the correct way. (1 Reply)
Discussion started by: prosserj
1 Replies

4. Programming

open()

i got a strange result when i write the function open("new",O_RDWR | O_CREATE ,0744) it create a file with the name new but in the authorization of the file it return --wS------ do anyone know what is the minnig of the capital S after i change the program,but with the same function, it done... (1 Reply)
Discussion started by: dbargo
1 Replies

5. Shell Programming and Scripting

sed question (again)

hello there, I have a sed question. I have a file (temp.srv), in it it has v1_host1 v2_host2 And I have another file (temp2.srv), in it is has v1_host3_date v1_host1 v2_host2 v2_host4_date v3_host5_date I had used a script to remove the name from temp2.srv base on the name inside... (3 Replies)
Discussion started by: ahtat99
3 Replies

6. UNIX for Advanced & Expert Users

how i write script to create 30 processes

helo i make one process for com port . in that i create two thread one for reading data and another for writing data to com port. now i want to write a script which create 30 processes for handling 30 com port. is it good solution for handling 30 com port. Thx & Regards, Amit (2 Replies)
Discussion started by: amitpansuria
2 Replies

7. Shell Programming and Scripting

Removing text from a line in a file

Hi All, I would like to know how to remove text from a line in a file. eg to The 4 sets of numbers are not static ie they change on each line in each different file so if anyone can help that would be great. Jeremy (10 Replies)
Discussion started by: outthere_3
10 Replies

8. Shell Programming and Scripting

Use of index in UNIX shell scripting

I have following line of code with me in one of the shell script. LIST=`awk -v SRV=$SRV -v GRP=$GRP -v ID=$ID '{ if (index($0, GRP) && index($0, SRV) == 2 ) Can anybody help me in understanding the code ? specifically the bold one (2 Replies)
Discussion started by: kaustubh137
2 Replies

9. UNIX for Advanced & Expert Users

getting error when open vi editor

helo I install my product for koren language I m uisng RHEL -4 operating system now problem is whenever I open any file vi filename I got following error on the screen E557: Cannot open termcap file 'vt100' not known. Available builtin terminals are: builtin_ansi ... (1 Reply)
Discussion started by: amitpansuria
1 Replies

10. Programming

Some how the open(file,flag, acc) returns 0 and write to the screen, instead of the file ???

I am out of idea what to do to resolve the problem! I need to use the open(file, for.., access) function to write a file. Never have the situation like that: it is return 0 - zero. As a result all write(..) going to the screen! What the problem it could be? I do not even know... (2 Replies)
Discussion started by: alex_5161
2 Replies

11. Programming

Urgent

hi i am new to unix . i dont know how to create file in unix through C programming, like we create file in C . kindly tell me the process to create,write into the file and delete the file through C in unix. thanks (1 Reply)
Discussion started by: mahvash
1 Replies

12. UNIX for Dummies Questions & Answers

"-maxdepth 1" argument for Solaris find. Other way to restrict find in only one directory?

Hi I wish to find only files in dir /srv/container/content/imz06/. It means exclude subfolder /srv/container/content/imz06/archive/ > uname -a SunOS testbox6 5.10 Generic_139555-08 sun4v sparc SUNW,Sun-Blade-T6320Its Solaris default "find" > find /srv/container/content/imz06/* -name... (4 Replies)
Discussion started by: slashdotweenie
4 Replies

13. Red Hat

How to create domain controller in Linux for windows client?

Hi Team I have configured a linux dns server locally. Its fully working on linux clients but not windows client as its can't ping host by name. someone told me to create domain controller for working this to windows client as well. I am new in linux and not aware how to create the domain and add... (8 Replies)
Discussion started by: boby.kumar
8 Replies

14. Red Hat

Process to use open files

I would like to test open files usage in my system, if I want to create a process ( or script ) that can use a certain amount ( eg. 1000 ) of open files , is it possible to create such process ( or script ) ? (3 Replies)
Discussion started by: ust
3 Replies

15. Shell Programming and Scripting

Simultaneous calling of url

Hello I want to call multiple sites simultaneously by xargs or parallel for example a.com/srv/1 a.com/srv/3 a.com/srv/2 a.com/srv/n That means 500 different sites will be called in a moment Then I use command I call a url at the same time. I need to call each url once, but every 500... (1 Reply)
Discussion started by: mnnn
1 Replies