Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!mcdchg!chinet!john From: john@chinet.chi.il.us (John Mundt) Newsgroups: comp.lang.c Subject: Re: getting users' tty # into a C program Message-ID: <7872@chinet.chi.il.us> Date: 5 Mar 89 19:39:13 GMT References: <441@lakesys.UUCP> Reply-To: john@chinet.chi.il.us (John Mundt) Organization: Chinet - Public Access Unix Lines: 15 In article <441@lakesys.UUCP> davek@lakesys.UUCP (Dave Kraft) writes: >I am writing a C program that need a user's tty number (i.e. tty3A). Is there >any internal/external function that can accomplish this? Bah! that last one should have been char *tty_ptr, *strrchr(), *ttyname(); tty_ptr = strrchr(ttyname(0), '/') + 1; -- --------------------- John Mundt Teachers' Aide, Inc. P.O. Box 1666 Highland Park, IL john@chinet.chi.il.us (312) 998-5007 (Day voice) || -432-8860 (Answer Mach) && -432-5386 Modem