SIGCHLD can only be caught by father process to monitor if child process exits. But I wish to write a stand-alone program to monitor some processes, if they quit, report a log immediately.
Is there any programming ways that I can use, rather than using a shell "ps" command to monitor process name/id, and then query in a dead loop?