Description of problem:
top run as root goes into hard loop if the xterm it is running under exits
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Start an xterm
2. su to root
3. run top
4. kill the xterm
top process goes into hard loop consuming 100% of available cpu
top process terminates
*** Bug 211957 has been marked as a duplicate of this bug. ***
Your xterm runs with non-root permissions and it can't send SIGHUP to the su
which runs with root permissions. This problem cannot be fixed. Sorry.
BTW, I you want to run the top with root permissions in a xterm, you can start
it by: su -c "xterm -e top".
This is actually a kernel bug.
The xterm itself DOES NOT send the SIGHUP. The SIGHUP is sent by the kernel
itself, automatically as the xterm dies.
On a real BSD system, where this whole idea originates AFAIK, the signal will
always get sent. Linux used to do this too, but broke when some other changes
went it. I believe it was the SE Linux merge that caused this, but note that the
bug shows up even when SE Linux is not compiled into the kernel. In other words,
I think the SE Linux changes broke non-SE systems.
I've been unable to find the bug from an examination of the kernel source. As
far as I can tell, the signal is sent in a way that will bypass permission
checking. Somehow though, this isn't working.
Please reopen this bug and assign it to the kernel.