How to check who uses semaphore in the system

With 'ipcs -s' command we can see how many semaphores are existing and who created it, but sometimes, we wants to know who actually uses it. Here's a simple application you can check with semctl() function. /* sem_pid.c */ #include #include #include #include #include int main(int argc, char **argv){ if (argc < 2) { printf("Usage:… Continue reading How to check who uses semaphore in the system