group orphaned checking using p_pptr or p_opptr?

From: Sushil Agrawal (sushil@cse.iitk.ac.in)
Date: Mon Jan 10 2000 - 13:54:39 EST


Hi all,
    I am running Linux 2.2.9 kernel.

When a process exits, the function exit_notify, in kernel/exit.c, checks
if its group will become orphaned as a result of its exit.
It first checks if its parent is in a different group using the
p_pptr->pgrp field. Instead of p_pptr, shouldn't it check the original
parent's group, i.e p_opptr->pgrp ?

Because if the process is being debugged, the p_pptr will be the debugger
but we are interested in the original parent.

For example, in the following cases, the original parent
is considered rather than the current parent.

- In handling the getppid system call, the *original parent*
process id is returned.

- In handling the setpgid system call, it is checked whether the caller is
the *original parent* of the process whose group is being changed.

Can somebody tell me why the present parent, and not the original parent,
is considered during the orphaned group checking ?

Thanks,
Sushil.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jan 15 2000 - 21:00:16 EST