Bug 89653
Summary: | When closing telnet, child processes are not killed | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Matthew Wygant <matthew_wygant> |
Component: | telnet | Assignee: | Harald Hoyer <harald> |
Status: | CLOSED DUPLICATE | QA Contact: | Ben Levenson <benl> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.2 | CC: | matthew_wygant |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i686 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2006-02-21 18:52:49 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Matthew Wygant
2003-04-25 15:18:23 UTC
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); wait(NULL); PAM_END; exit(0); } solution: - 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 *** Changed to 'CLOSED' state since 'RESOLVED' has been deprecated. |