Bug 89653 - When closing telnet, child processes are not killed
When closing telnet, child processes are not killed
Status: CLOSED DUPLICATE of bug 59029
Product: Red Hat Linux
Classification: Retired
Component: telnet (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Harald Hoyer
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2003-04-25 11:18 EDT by Matthew Wygant
Modified: 2007-04-18 12:53 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-02-21 13:52:49 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Matthew Wygant 2003-04-25 11:18:23 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020826

Description of problem:
When exiting the telnet session (by closing the terminal and NOT typing exit) if
there are any child processes running in the background, they become session
zombies and eat up 100% of the processor.  If exit is typed, this does not
occur, if SSH is used, this does not occur.  This occurs on a RH8 server as
well.  Cannot use SSH, customer base too large to retrain to type exit.  Tried
freshen install of telnet-server, got latest util-linux, did up2date on all
packages and problem still exists.  

Version-Release number of selected component (if applicable):
default version of telnet-server, updated util-linux-2.11z

How reproducible:

Steps to Reproduce:
1.open telnet to a RH7.2 server
2.start jobs/processes
3.close terminal by closing terminal, not exit
4.run top to see CPU get eaten up 

Actual Results:  CPU goes to 100% within a few minutes.

Expected Results:  Child processes get SIGHUP and die a graceful death.

Additional info:
Comment 1 Harald Hoyer 2003-04-25 11:51:17 EDT
ok, here is the problem:
- telnetd exits
- kernel sends SIGHUP to terminal sessions leader
- login has forked itsself because of PAM
- the parent login process ignores SIGHUP
- the child login (now bash) does not get SIGHUP
--> login and bash stay alive after telnetd exists

problem is in util-linux-2.11n-5 login.c(1135):
    } else if (childPid) {
       /* parent - wait for child to finish, then cleanup session */
       /* ioctl(0, TIOCNOTTY, NULL); */
       signal(SIGHUP, SIG_IGN);
       signal(SIGINT, SIG_IGN);
       signal(SIGQUIT, SIG_IGN);
       signal(SIGTERM, SIG_IGN);


- catch the signal and kill(childPid, SIGHUP)
- or make the child the session leader (setsid())

As per #54741, this is fixed in util-linux-2.11n-8

*** This bug has been marked as a duplicate of 59029 ***
Comment 2 Red Hat Bugzilla 2006-02-21 13:52:49 EST
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.

Note You need to log in before you can comment on or make changes to this bug.