Interprocess Communication IPC

Since processes run in their own memory space, they can not communicate with each other without passing through the kernel.

One way to communicate is to use the standard input and output. Instead of connection the terminals keyboard and console, an other process can be used.

One of the easiest way is sending signals to processes. Processes can send signals via the kernel but they can also have signal handles to have custom code to act when a signal arrives. The signals can not contain data, they are used to send events. The event is identified by the signal number that is defined in /usr/include/bits/signum.h. Some commonly used signals are:

Table 3.2. Signals

Number Identifier Description
2 SIGINT Ctrl-C has been pressed and process should stop
9 SIGKILL Send signal to kill the process
17 SIGCHLD The child process informs the parent process that it has stopped



Linurs Servernest startpage