Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ipc.h(3head) [v7 man page]

ipc.h(3HEAD)							      Headers							      ipc.h(3HEAD)

NAME
ipc.h, ipc - XSI interprocess communication access structure SYNOPSIS
#include <sys/ipc.h> DESCRIPTION
The <sys/ipc.h> header is used by three mechanisms for interprocess communication (IPC): messages, semaphores, and shared memory. All use a common structure type, ipc_perm, to pass information used in determining permission to perform an IPC operation. The ipc_perm structure contains the following members: uid_t uid /* owner's user ID */ gid_t gid /* owner's group ID */ uid_t cuid /* creator's user ID */ gid_t cgid /* creator's group ID */ mode_t mode /* read/write permission The uid_t, gid_t, mode_t, and key_t types are defined as described in <sys/types.h>. See types.h(3HEAD). Definitions are provided for the constants listed below. Mode bits: IPC_CREAT Create entry if key does not exist. IPC_EXCL Fail if key exists. IPC_NOWAIT Error if request must wait. Keys: IPC_PRIVATE Private key. Control commands: IPC_RMID Remove identifier. IPC_SET Set options. IPC_STAT Get options. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ SEE ALSO
ftok(3C), types.h(3HEAD), attributes(5), standards(5) SunOS 5.10 10 Sep 2004 ipc.h(3HEAD)

Check Out this Related Man Page

ipc.h(3HEAD)                                                          Headers                                                         ipc.h(3HEAD)

NAME
ipc.h, ipc - XSI interprocess communication access structure SYNOPSIS
#include <sys/ipc.h> DESCRIPTION
The <sys/ipc.h> header is used by three mechanisms for interprocess communication (IPC): messages, semaphores, and shared memory. All use a common structure type, ipc_perm, to pass information used in determining permission to perform an IPC operation. The ipc_perm structure contains the following members: uid_t uid /* owner's user ID */ gid_t gid /* owner's group ID */ uid_t cuid /* creator's user ID */ gid_t cgid /* creator's group ID */ mode_t mode /* read/write permission The uid_t, gid_t, mode_t, and key_t types are defined as described in <sys/types.h>. See types.h(3HEAD). Definitions are provided for the constants listed below. Mode bits: IPC_CREAT Create entry if key does not exist. IPC_EXCL Fail if key exists. IPC_NOWAIT Error if request must wait. Keys: IPC_PRIVATE Private key. Control commands: IPC_RMID Remove identifier. IPC_SET Set options. IPC_STAT Get options. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ SEE ALSO
ftok(3C), types.h(3HEAD), attributes(5), standards(5) SunOS 5.10 10 Sep 2004 ipc.h(3HEAD)
Man Page

12 More Discussions You Might Find Interesting

1. Programming

Message Queue Problem

Hi all, I need help about message queues, i have a server-client program that communicates each other via msg queue, firstly server opens its msg queue and waits for msg then client opens server msg queue and its own msg queue(for receiving msg from server,clients sends msg to server msg... (7 Replies)
Discussion started by: SaTYR
7 Replies

2. Programming

semaphore memory

If say a process creates a semaphore/mutex etc then will this semaphore get created in its address space? If yes then how an another process which wants to acquire this semaphore(created by the first process) will access the other process address space to acquire the semaphore? Where I mean in... (2 Replies)
Discussion started by: rupeshkp728
2 Replies

3. Programming

Error retrieving value from IPC shared memory

Assume in 1.txt file ,i have saved 32 writer.c ----------- #include <sys/types.h> #include <sys/ipc.h> #include <sys/shm.h> #include <stdio.h> #include<stdlib.h> #include<fcntl.h> int main(){ int shm_id; key_t mem_key; int *shm_ptr; int fd=open("1.txt",O_CREAT|O_RDWR,0777); mem_key =... (2 Replies)
Discussion started by: subi09
2 Replies

4. Programming

Msgget(2) returns 0 - a workaround fix

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)
Discussion started by: mr_bandit
10 Replies

5. Programming

Semaphores Program in C

Hi everybody, :o I hope you can help me to solve this problem I have. I'm trying to write a program with Linux in C which uses semaphores and shared memory. In particular I need to create a leader process and three more processes "calculators" (1, 2 and 3) that make mathematical operations.... (4 Replies)
Discussion started by: IgorGest
4 Replies

6. Programming

Nanosleep in signal call

Hi @ll :) I have a problem with my code but first a short description: 1. I have one signal call SIGUSR1 2. In the signal I try to use nanosleep and now: When I put kill -SIGUSR1 pid --> sometimes works fine, sometimes returns me an error with ,,Interrupt system call", sometimes I got... (5 Replies)
Discussion started by: mattdj
5 Replies

7. Programming

Linux Shell Piping w/Shared Memory

So I am pretty new to the linux environment, and I am trying to create a shell that uses multiple pipes, and I read online that piping using shared memory space is more efficient than using regular piping. However, I have zero clue how to use shared memory space with pipes. Has anyone done this... (1 Reply)
Discussion started by: Greg_MC
1 Replies

8. Programming

I can't compile (gcc) in Solaris 11.3 non global zone

I can't compile anything, the final make error says "Command failed for target `install-recursive'", but I am not able to identify the root cause of that error, I tried with cc, gcc 4.5, also gcc 5.2, using make, using gmake 3.82, ld 5.11, gld 2.31... and I am totally stuck yet... please help, to... (4 Replies)
Discussion started by: sugar222
4 Replies

9. UNIX for Beginners Questions & Answers

Questions about IPC

Hello and thanks in advance for any help anyone can offer to help me understand this I'm curious about a 30.000 ft view on how IPC works in Linux between parent-child processes...I understand there's multiple types of IPC's... But I'm currently trying to figure out if parent-child process IPC... (1 Reply)
Discussion started by: bodisha
1 Replies

10. UNIX for Beginners Questions & Answers

One parent, multiple children pipe with fork()

The task I have to do is something along the lines "I receive some input and based on the first character I send it through pipe to one of the children to print". The scheme it is based on is 1->2; 1->3; 1->4; 2 will print all the input that starts with a letter, 3 will print all the input that... (2 Replies)
Discussion started by: Ildiko
2 Replies

11. AIX

Compiling problem - AIX 7.2

Hi We meet errors while running configuration scripts to prepare compiling source code on AIX 7.2. This error does not happen on AIX5.3 and AIX6.1 With the “/usr/bin/sh” from AIX7.2, sometimes , the script runs sucessfully, sometimes not. It’s unstable, and I don’t know why. When... (10 Replies)
Discussion started by: bobochacha29
10 Replies

12. UNIX for Beginners Questions & Answers

NTP synchronised problem in our Centos 7.6 node

Someone, please help on this issue:- Note : for security reason i didn't mention hostnames and ips. ============================================================================== # ntpstat unsynchronised polling server every 1024 s Ntpstat showing unsynchronised. ... (29 Replies)
Discussion started by: shanmugaraj
29 Replies