IPC(2) Linux Programmer's Manual IPC(2)NAME
ipc - System V IPC system calls
SYNOPSIS
int ipc(unsigned int call, int first, int second, int third,
void *ptr, long fifth);
DESCRIPTION
ipc() is a common kernel entry point for the System V IPC calls for messages, semaphores, and shared memory. call determines which IPC
function to invoke; the other arguments are passed through to the appropriate call.
User programs should call the appropriate functions by their usual names. Only standard library implementors and kernel hackers need to
know about ipc().
CONFORMING TO
ipc() is Linux-specific, and should not be used in programs intended to be portable.
NOTES
On a few architectures, for example ia64, there is no ipc() system call; instead msgctl(2), semctl(2), shmctl(2), and so on really are
implemented as separate system calls.
SEE ALSO msgctl(2), msgget(2), msgrcv(2), msgsnd(2), semctl(2), semget(2), semop(2), semtimedop(2), shmat(2), shmctl(2), shmdt(2), shmget(2)COLOPHON
This page is part of release 3.27 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
Linux 2007-06-28 IPC(2)
Check Out this Related Man Page
FTOK(3) Linux Programmer's Manual FTOK(3)NAME
ftok - convert a pathname and a project identifier to a System V IPC key
SYNOPSIS
#include <sys/types.h>
#include <sys/ipc.h>
key_t ftok(const char *pathname, int proj_id);
DESCRIPTION
The ftok() function uses the identity of the file named by the given pathname (which must refer to an existing, accessible file) and the
least significant 8 bits of proj_id (which must be nonzero) to generate a key_t type System V IPC key, suitable for use with msgget(2),
semget(2), or shmget(2).
The resulting value is the same for all pathnames that name the same file, when the same value of proj_id is used. The value returned
should be different when the (simultaneously existing) files or the project IDs differ.
RETURN VALUE
On success, the generated key_t value is returned. On failure -1 is returned, with errno indicating the error as for the stat(2) system
call.
CONFORMING TO
POSIX.1-2001.
NOTES
Under libc4 and libc5 (and under SunOS 4.x) the prototype was:
key_t ftok(char *pathname, char proj_id);
Today proj_id is an int, but still only 8 bits are used. Typical usage has an ASCII character proj_id, that is why the behavior is said to
be undefined when proj_id is zero.
Of course no guarantee can be given that the resulting key_t is unique. Typically, a best effort attempt combines the given proj_id byte,
the lower 16 bits of the inode number, and the lower 8 bits of the device number into a 32-bit result. Collisions may easily happen, for
example between files on /dev/hda1 and files on /dev/sda1.
SEE ALSO msgget(2), semget(2), shmget(2), stat(2), svipc(7)COLOPHON
This page is part of release 3.44 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
GNU 2001-11-28 FTOK(3)
I know that there are lots of UNIX pros here so I'm asking for some help. I have recently acquired 2 SUN IPC Workstations. The stations were destined for the garbage so I was unable to talk to the owners. Neither of them will make it through the boot process. One gives an error "le0: No... (2 Replies)
:) Hello, i have been given the following code to help me learn how to use signals, it won't compile. The problem maybe because this was written for use in Unix and i am trying to compile in Linux.
The error i get says that SIGPIPE and SIG_IGN are undeclared.
I think that these are defined... (2 Replies)
We have a requirement to port applications from Unix to HP Vax OpenVMS Server.
For this I need to self-educate on various IPC and networking APIs available in OpenVMS. I goggled a lot but could not find of how to implement Semaphores, Message Queues and all other forms of IPC available in Unix... (7 Replies)
hai,
i am doing my masters degree in computers.please any one tell me about
fork(),semaphores,mutex,messaging queues,messaging using pipes ,and msgget(),msgrecv() funtions
in ipc programming .
i have exam on that i have a book but in that they not given clearly.
hope u will
... (2 Replies)
Hello,
My question is related to "pipcs -qa" command under HP-UX 11i PA-RISC 64 bits.
We have a little C program that creates posix ipc message queues using the mq_open() system function.
The program fail with 'No space left on device' error when we create big queues. What is the system... (6 Replies)
Hi,
I'm porting code from Windows to HP-UX 11, compiling with gcc.
I have a call to semtimedop with 4 arguments as in the definition:
int semtimedop(int, struct sembuf *, unsigned int, const struct timespec *);
When compiling I get an error saying:
error: 'semtimedop' was not declared in... (3 Replies)
Hi,
Anyone knows whether it is possible to link/relate an IPC semaphore to a particular process ID?
e.g.
# ipcs -as
IPC status from <running system> as of Wednesday July 2 14:10:39 EST 2008
T ID KEY MODE OWNER GROUP CREATOR CGROUP NSEMS OTIME CTIME... (8 Replies)
Hiya Everybody just joined,
Not sure if this is the right section:o
I require abit of an assistance with IPC!
I know there are different types of IPC porcesses like signals, semaphores, mutexes, shared memory, message queues, pipes and sockets.
Now say a system has a number of... (4 Replies)
Hi,
I wanted ideas on how to achieve this efficiently using C++ concept:-
I have a DB table that contains rows of endpoints (say IDs vs names). There is process say "A" that calls another process B's API to increment counters if an operation is performed by an endpoint.
DB table:-
ID ... (3 Replies)
What if the operating systems would not use any ipc mechanism in order to exchange the datas with each other,which technique could be an alternative for messaging between the processes?Do you guys think using the vfork () system call to duplicate processes is a logical solution for this problem? (4 Replies)
Hi!
I wanted to know the advantages / disadvantages of different IPC mechanims such as sockets, pipes (unnamed) , shared memory & message queues.
Pipes for example i hear are fast , but are difficult to debug as compared to sockets.
Can you guys please name some situations where one is... (4 Replies)
here i havent tried to make a communication between two terminals of different machines
not either any socket program
my simple aim is use ipc for chat between two soft terminals(tty's)
here is my view two terminals with two applications working on same fifo
one fifo b/w two terminals try... (3 Replies)
Greetings:
I am posting this because my searches for this problem only came up with two posts and no helpful suggestions. I have a "solution" (read work-around hack) and have not tried yet to find a root cause, and may never because I am busy doing other things (read working to pay the bills).
... (10 Replies)