ttyname() - question

fieland at hobbiton.prime.com fieland at hobbiton.prime.com
Wed Aug 30 05:26:00 AEST 1989


I can't answer your question.  In fact, your program(s) didn't
print out my tty on either the MIPS or my Sun 386i.  I was able
to get my tty on the mips with the program below, although the
term returned was null when I executted the program on the SUn
in a window.

Notice the print format.


Peggy
#include <stdio.h>
main()
{
	char *term;
	char *ttyname();
	term=ttyname();
	printf("%s\n",term);
	test();
}
test()
{
	char *term;
	char *ttyname();
	term=ttyname();
	printf("%s\n",term);
}



More information about the Comp.lang.c mailing list