Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ttyhog on pts

441 views
Skip to first unread message

Don Ramm

unread,
Aug 18, 1995, 3:00:00 AM8/18/95
to
I'm getting some ttyhog errors is the error log. They are occurring
on a pts port which is being used by a PC running some TCP/IP software.

I found all sorts of info on how to deal with this in InfoExplorer
and IBM's on-line Q&A database if the ttyhog is happening on a tty
port, but don't know what to do in this case.

Anyone see this error on a pts before? Suggestions?

Is it really as simple as the documentation says:

The tty error is logged because the buffer where
incomeing charactyers are placed is overflowing.

However, this write up from InfoExplorer goes on to say:

When the buffer is about 3/4 fill, the device driver
notifies the hardware (in this case tty) to send the
XOFF character to the sender to sopt sending data.

But it's not the tty in this case.


Michael Wojcik

unread,
Aug 19, 1995, 3:00:00 AM8/19/95
to
In article <DDHuC...@crash.cts.com> don...@cts.com (Don Ramm) writes:
>I'm getting some ttyhog errors is the error log. They are occurring
>on a pts port which is being used by a PC running some TCP/IP software.
>
>I found all sorts of info on how to deal with this in InfoExplorer
>and IBM's on-line Q&A database if the ttyhog is happening on a tty
>port, but don't know what to do in this case.

A pts is a tty for many purposes, including this one.

>Anyone see this error on a pts before? Suggestions?

You can get ttyhog errors pasting lots of text into aixterms,
which use ptys (psuedo terminals). Many moons ago someone posted
a program which sets the ttyhog size on the pts the program is
run under (ie. the shell's tty). It went something like this
(apologies to the original author):

/*
* Set the OHOG on the current terminal to 4096 bytes. This allows xterm/
* aixterm to do full-window pastes correctly.
*/

#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/ioctl.h>

void main(void)
{
int fd, bufsz;

if ((fd = open("/dev/tty", O_RDWR, 0666)) < 0)
{
perror("open");
exit(1);
}
bufsz = 4096;
if (ioctl(fd, TXSETOHOG, &bufsz) < 0)
{
perror("ioctl");
exit(1);
}
exit(0);
}

Note that opening "/dev/tty" opens the process' controlling
terminal. If the ptys that are giving you trouble are being used
for login, you can run this program from a .profile or other login
script.

Michael Wojcik
AAI Development, Micro Focus Inc.
Department of English, Miami University


0 new messages