Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!lll-tis!ames!rutgers!mtune!codas!usfvax2!jc3b21!jra From: jra@jc3b21.UUCP (Jay R. Ashworth) Newsgroups: comp.unix.wizards Subject: Re: /dev/tty doesn't exist? Message-ID: <243@jc3b21.UUCP> Date: 4 Jan 88 04:28:13 GMT References: <445@minya.UUCP> Organization: A&P Productions Lines: 25 In article <445@minya.UUCP>, jc@minya.UUCP (John Chambers) says: > > Anyone have an idea what my program X might be doing to screw up /dev/tty? [ Yes. ] > Some hints: This is a rather generic Unix Sys/V.2, so the problem should > be similar to most ATT Unices. The most unusual thing about how X is run > is that it isn't being started by a login shell; it is started as a daemon > by init, and in some cases, decides to grab a terminal (whose name is on > its command line, and which doesn't have getty on it) and run a program > there. This is a useful thing to do if, for instance, you are playing > around with process-control applications. > John Chambers <{adelie,ima,maynard,mit-eddie}!minya!{jc,root}> (617/484-6393) Aha. As I understand the way these things work, and I'm sure someone will clarify what I'm about to say :-), /dev/tty is set by the kernel to point to the control terminal of a process group. Background process, those running as daemons, have no control terminal. Look at a ps listing. Also, when was the last time you tried to make an rc script read the console? My last time, I discovered that I had to use /dev/console (Yes, ack, this was on a tandy 6000), just /dev/tty bombed. Good luck. -- jra -- Jay R. Ashworth ---+-- The Great Ashworth & ------------+...!uunet!codas!pdn! 10974 111th St. N. | Petrillo Production Company | jc3b21!jra Seminole FL 34648 +-- watch for BayLink Public Access -+- UNIX ----+--------- (813) 397-1859 ----+-- Tampa Bay's Smallest Video Production House -+ :-) !$