isatty() and ttyname() addendum

mue at ugun21.UUCP mue at ugun21.UUCP
Thu Feb 23 20:28:00 AEST 1989


Both functions (isatty, ttyname) need a file descriptor as a
parameter, not a file pointer. So you have to specify

	if (isatty(0 /*stdin */) ... rsp.
	if (ttyname(0) != NULL) ...

...mcvax!unido!hmueller.pad



More information about the Comp.unix.questions mailing list