I see that in sys_wait4
(that is reached through calls to wait()
or waitpid()
) we insert the current process into a special queue that is saved in its struct task:
DECLARE_WAITQUEUE(wait, current);
add_wait_queue(¤t->wait_chldexit,&wait);
So if I want to check if a certain process is waiting due to call to wait()
or waitpid()
I need to check if it's in its own (???) wait_chldexit queue?
So only the process itself could be inserted into its own wait_chldexit queue?
Did I get it right?
This is linux kernel 2.4.