Wait on ptraced child process and other questions

Alexander Kjeldaas (astor@guardian.no)
Sat, 21 Mar 1998 05:51:29 +0100


When a process waits on a child process, and this process is ptraced
what is the correct behaviour, to wait on the child or return an
error? The current behaviour is to returns ECHILD while the child is
ptraced.

The reason for this is how ptrace works, which is by changing the
parent of the process to the ptracing process. The process waiting
will therefore not see its child as a real child and returns ECHILD.

Could someone explain briefly why the parent process of the ptraced
process must be changed?

astor

-- 
 Alexander Kjeldaas, Guardian Networks AS, Trondheim, Norway
 http://www.guardian.no/

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu