Skip to content

Tag: ipc

“Loose” inter process communication

I have two programs (namely dwm and slock). I want to trigger a function in dwm depending on events happening in slock and vice versa. The requirement is that both should be independent and run without the other program and also work together. What is the easiest and/or the best (most efficient) IPC solution/…

Wait for signal from parent and does job and blocks again

Write a program that can display a text string (consisting only of the 26 alphabets and spaces). The program should fork 27 worker processes. Each worker process runs an infinite loop in which it waits for a signal from the controller (i.e., parent), sleeps for 1 sec, prints its pre-defined character, signals…

Signal all processes in process group except self

I am writing a program which multiple processes will run concurrently. In this program, there is a need for one process to suspend all other participants temporarily. In order to spare myself the overhead of tabulating all participant process ID’s in a shared page and signaling them individually, I have…

Get notified about process termination

I’m trying to use NETLINK with CN_IDX_PROC to monitor my process. This works but requires the monitoring process to be launched with root privileges. I’ve tried to fix it by setting a capability in the filesystem on my monitoring executable (including CAP_AUDIT_READ, CAP_SYS_ADMIN,CAP_SYS_PTRACE and CAP_IPC_O…

Select() to read in sockets

I have a client server client connection where the server reads the message sent by the client every 1 second but I do not want the server to keep on waiting for a message for too long. I tried using the select() function but the server continues waiting for some message to read. Could anyone tell me what I a…