Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!umich!yale!cs.utexas.edu!sdd.hp.com!hp-pcd!hpfcso!hpfcmgw!rdg From: rdg@hpfcmgw.HP.COM (Rob Gardner) Newsgroups: comp.sys.hp Subject: Re: Strange "getty: failed to open /dev/tty" behavior Message-ID: <1080167@hpfcmgw.HP.COM> Date: 24 Aug 90 17:58:19 GMT References: <481@bnrunix.UUCP> Organization: HP Fort Collins, CO Lines: 36 > getty: failed to open /dev/tty: no such device or address That message is in there to save you a few headaches. It might seem like the message itself is a headache, but at least you have some idea what the problem is. If /dev/tty doesn't open successfully, it means that the getty failed to associate its process group with the terminal specified on the command line. This means that the shell exec'd from this getty, and all descendant processes will have no control terminal. A more serious problem is that you won't be able to login on this port if you try to login to an account with a password. After entering the account name, you will see "Login incorrect" immediately, before even being prompted for a password! This is because the getpass() routine used by login tries to open /dev/tty to read the password. If you manage to login to an account with no password, the first thing you'll probably notice is that the ps command will show "?" for the tty. Then you'll notice that the break key doesn't work. And of course, any command that calls getpass(), or relies of /dev/tty in some way wll fail. AND, all this will be very mysterious, and it will give you a serious headache. What causes this anyway? Association of process group leader and control terminal occurs only if the process group currently has no control terminal, and the terminal is currently not somebody elses control terminal. (BTW, association occurs when the tty device is opened.) Now, the getty is definitely a process group leader with no control terminal. So, the problem is that the terminal you want the getty to run on is already associated with somebody else. The ps command shows (in the tty column) the control terminal for each process running. I have seen this happen when some backround script decides to open /dev/console or something to print a message. It may also happen because some process that was associated with the device in question is still hanging around waiting for somebody to send it a SIGNUKE. Rob