Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 56551 - Race in /bin/login causing loss of job control
Race in /bin/login causing loss of job control
Status: CLOSED DUPLICATE of bug 54741
Product: Red Hat Linux
Classification: Retired
Component: util-linux (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Elliot Lee
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2001-11-20 15:44 EST by Itai Nahshon
Modified: 2007-04-18 12:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-11-20 15:45:01 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 Itai Nahshon 2001-11-20 15:44:54 EST
Description of Problem:
A race condition in /bin/login may cause loss of job control. This
is noticed mainly in tcsh that loses most of its interactive features.

Version-Release number of selected component (if applicable):
util-linux-2.11f-11.7.1 (in Redhat Linux 7.1 updates)
util-linux-2.11f-12     (in RedHat Linux 7.2 updates)

How Reproducible:

Steps to Reproduce:
1. Telnet and login again and again until you get the problem.
2. Usually it takes me 5 to 10 attampts on an idle computer
   (686 single processor). Less on a busy SMP computer.
3. Using tcsh makes the problem more noticable.

Actual Results:
(in tcsh, immediately after login)
Warning: no access to tty (Inappropriate ioctl for device).
Thus no job control in this shell.

Then when I get the prompt I cannot use arrow keys to edit
line. When an app is running I cannot use CTRL-C or CTRL-Z
to kill or suspend the app.

Expected Results:
I expect full functionality of tcsh.

Additional Information:
See also bug #56121 which is open against tcsh.

Code (inside #ifdef USE_PAM) is calling
  ioctl(0, TIOCNOTTY, NULL);
in the parent process immediately AFTER a fork().
The child process is doing
  opentty(ttyn);   (really re-opening the tty)

Bahavior depends on the order in which things
happen. If the ioctl happens first things
work OK. If the ioctl comes after the open we
start tcsh without a controlling tty and hence
the problem.
Comment 1 Elliot Lee 2001-11-20 15:49:29 EST

*** This bug has been marked as a duplicate of 54741 ***

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