For child processes, the wait() and waitpid() functions can be used to suspends execution of the current process until a child has exited. But t
wait()
waitpid()
Since linux kernel 5.3 there is a pidfd_open syscall, which creates an fd for a given pid, which can be polled to get notification when pid has exited.