getting users' tty # into a C program

John Mundt john at chinet.chi.il.us
Mon Mar 6 05:39:13 AEST 1989


In article <441 at lakesys.UUCP> davek at 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 at chinet.chi.il.us
(312) 998-5007 (Day voice) || -432-8860 (Answer Mach) && -432-5386 Modem  



More information about the Comp.lang.c mailing list