|
Home > Archive > Unix Programming > January 2005 > ttyname() help
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Jon Bryan 2005-01-16, 8:47 pm |
| Hello,
I am writing a Terminal Emulator, and for the Window Title I want
something like "termname -- shell -- ttysize -- ttyname." I have
everything figured out except for how to find the ttyname. There is a
function defined in unistd.h. I cannot get it to work right. Would
someone please give me an example?
Thanks
~ Jon Bryan
| |
| Barry Margolin 2005-01-16, 8:47 pm |
| In article <2005011619024316807%jgbryan@gmailcom>,
Jon Bryan <jgbryan@gmail.com> wrote:
> Hello,
> I am writing a Terminal Emulator, and for the Window Title I want
> something like "termname -- shell -- ttysize -- ttyname." I have
> everything figured out except for how to find the ttyname. There is a
> function defined in unistd.h. I cannot get it to work right. Would
> someone please give me an example?
I presume you're using a pseudo-tty to communicate between the emulator
and the process running in it. Make sure you're calling ttyname() on
the *slave* end of the pty.
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
|
|
|
|
|