Questions tagged [ipc]

Inter Process Communication usually refers to kernel services that allow processes on the same machine to communicate with each other.

Inter Process Communication usually refers to kernel services that allow processes on the same machine to communicate with each other. It can also be used for non-kernel libraries that leverage the efficiency of localhost networking protocols to provide inter process messageing services. ZeroMQ is an example of the latter.

Kernel IPC services vary quite a bit from flavour to flavour of UNIX, and also have evolved to the extent that older APIs are considered obsolete. This is an area where it is difficult to write portable code unless you stick to TCP/IP and rely on the fact that modern kernels have greatly optimized their TCP stacks for connections within localhost. Note that localhost generally includes addresses such as 127.0.0.2, 127.0.0.99, etc. which provides a greater namespace for addressing endpoints on a single machine.

116 questions
103
votes
6 answers

A list of available D-Bus services

Is there such a thing as list of available D-Bus services? I've stumbled upon a few, like those provided by NetworkManager, Rhythmbox, Skype, HAL. I wonder if I can find a rather complete list of provided services/interfaces.
madfriend
  • 1,133
  • 2
  • 8
  • 5
54
votes
5 answers

Are FIFO, pipe & Unix domain socket the same thing in Linux kernel?

I heard that FIFOs are named pipes. And they have exactly the same semantics. On the other hand, I think Unix domain socket is quite similar to pipe (although I've never made use of it). So I wonder if they all refer to the same implementation in…
Justin
  • 703
  • 1
  • 5
  • 8
27
votes
8 answers

How to list all object paths under a dbus service?

This is a follow-up question to A list of available DBus services. The following python code will list all available DBus services. import dbus for service in dbus.SystemBus().list_names(): print(service) How do we list out the object paths…
user768421
  • 465
  • 2
  • 5
  • 7
20
votes
3 answers

linux command to check POSIX message queue

We can check the details of system V message queue with the help of ipcscommand. Is there any command to check POSIX message queue in Linux?
sujin
  • 303
  • 1
  • 2
  • 6
19
votes
4 answers

How to pass a password to a child process?

Passing a password on command line (to a child process started from my program) is known to be insecure (because it can be seen even by other users with ps command). Is it OK to pass it as an environment variable instead? What else can I use to pass…
porton
  • 2,136
  • 2
  • 21
  • 28
16
votes
2 answers

Is there a way to intercept interprocess communication in Unix/Linux?

For intercepting/analyzing network traffic, we have a utility called Wireshark. Do we have a similar utility for intercepting all the interprocess communication between any two processes in Unix/Linux? I have created some processes in memory and I…
Lazer
  • 34,477
  • 25
  • 70
  • 75
15
votes
2 answers

Why there are only two user defined signals?

In the list of signals defined in a linux system, there are two signals stated as User Defined signals (SIGUSR1 and SIGUSR2). Other signals will be raised or caught in specific situations, but SIGUSRs are left for user application's use. So why…
saeedn
  • 2,484
  • 3
  • 19
  • 15
11
votes
1 answer

How can I determine the connection method used by a MySQL client?

When using a MySQL client (e.g. mysql) how can I determine whether it connected to the server using a Unix socket file or by using TCP/IP?
Eugene Yarmash
  • 14,675
  • 14
  • 50
  • 57
10
votes
3 answers

How to implement "generators" like $RANDOM?

The special variable $RANDOM has a new value every time it's accessed. In this respect, it is reminiscent of the "generator" objects found in some languages. Is there a way to implement something like this in zsh? I tried to do this with named…
kjo
  • 14,779
  • 25
  • 69
  • 109
8
votes
3 answers

`/proc/$PID/cwd` : is there a POSIX equivalent?

Linux has a /proc directory and file‑system, which as far as I can tell, is not part of POSIX. In each /proc/$PID subdirectories, is a symbolic link, cwd, pointing to the actual working directory of the process of this PID (the cwd link is always up…
Hibou57
  • 845
  • 2
  • 9
  • 20
7
votes
3 answers

Does one end of a pipe have both read and write fd?

As far as I understood one end of a pipe has both read and write fd's and the other end also has read and write fd's. Thats why when we are writing using fd[1], we are closing the read end e.g. fd[0] of the same side of the pipe and when we are…
Subi Suresh
  • 495
  • 2
  • 6
  • 12
6
votes
1 answer

How do I increase the number of semaphore arrays in Linux?

In a Debian lenny server running postgresql, I noticed that a lack of semaphore arrays is preventing Apache from starting up. Looking at the limits, I see 128 arrays used out of 128 arrays maximum, for semaphores. I know this is the problem because…
Daniel C. Sobral
  • 170
  • 1
  • 1
  • 6
5
votes
1 answer

Creating a terminal device for interprocess communication

I'd like to know how to create a terminal device to simulate a piece of hardware connected through a serial port. Basically, tty device with a certain baud rate that can be read from and written to between two processes. From what I understand, a…
sj755
  • 1,115
  • 6
  • 13
  • 22
5
votes
1 answer

Command line pub / sub without a server?

Is there a way of implementing the publish / subscribe pattern from the command line without using a server process? This need only work on one machine. The main thing I want to avoid by not having a server process is having configure a machine to…
Att Righ
  • 1,176
  • 11
  • 29
5
votes
1 answer

ipcs(1) POSIX equivalent to System V

I know that with ipcs(1) command, one can monitor System V message queues, shared memory and semaphores, but how do I monitor POSIX message queues, shared memory and semaphores. For POSIX message queues, I can mount a pseudo filesystem, as stated in…
Kouros
  • 195
  • 9
1
2 3 4 5 6 7 8