Operating System - HP-UX
1753470 Members
5178 Online
108794 Solutions
New Discussion юеВ

Re: Business Basic buffering problem?

 
SOLVED
Go to solution
Brad Marks
Super Advisor

Business Basic buffering problem?

Im running HP-UX 11.0 on a d350. Also running Java version 1.3.1.02. I'm experimenting with a Java-enabled (and actually written in Java) Business basic called BBj from Basis International.

I'm getting strange behaviour that seems Unix-related: I logon to the system (as root or just a normal user - the problem exists with either) and then invoke BBj. When at the BBj prompt echoing of typed characters occurs only once the each fourth character has been entered (e.g. If I type "hello", the "hell" will display when I type the last "l", and the "o" won't display - at least until I type 3 more characters).

Tech support at Basis are quite helpful and rarely pass the buck. They have a d-350 configured as mine, but do not have the (possibly 'buffering'?) problem.

Here's the weird part: If I log on and invoke vi, quit vi (without saving), and then invoke BBj the problem does not occur. I can even start a BBj session where the problem will occur, quit BBj, do the vi thing, re-invoke BBj, and the problem will no longer occur.

Does this (hopefully) strike a nerve with anyone? I'm current with patches (I believe), and have tried different terminal emulators and different $TERM settings to no avail.

Kudos to anyone with a clue.
Thanks,
Brad
It's not impossible -- it'll just cost more...
15 REPLIES 15
harry d brown jr
Honored Contributor

Re: Business Basic buffering problem?

Brad,

I think you have crossed into the twilight zone....do not go towards the light...

Seriously, how are you logging in, over a network or terminal server, telnet, rlogin, remsh?

live free or die
harry
Live Free or Die
Jeff Machols
Esteemed Contributor

Re: Business Basic buffering problem?

Something to start with

before you run vi run

# stty -a

then go into vi and quit, then run the stty -a again. See if anything changes, look at any flag with an echo in it
Helen French
Honored Contributor

Re: Business Basic buffering problem?

Hi,

Try this:

# ksh -o vi

HTH,
Shiju
Life is a promise, fulfill it!
Helen French
Honored Contributor

Re: Business Basic buffering problem?

Hi again,

OR

# sh -o vi

if you are using 'sh' shell

Shiju
Life is a promise, fulfill it!
Brad Marks
Super Advisor

Re: Business Basic buffering problem?

Thanks for the responses: Jeff, I did as you asked sending the stty -a results to seperate files before and after invoking vi. Here's the results of 'diff' on the two files:

$ diff stty1 stty2
3c3
< min = 4; time = 0;
---
> min = 1; time = 1;
$

Is this meaningful?

Harry, I'm logging in over a network via telnet.
I've always wondered about prisoners who have to manafacture license plates with 'live free or die' on them: Does that prison have an exceptionally high rate of suicide?

Thanks guys,
Brad (and Rod Serling)
It's not impossible -- it'll just cost more...
Jeff Machols
Esteemed Contributor
Solution

Re: Business Basic buffering problem?

have you tried running a resize when you first log in?
harry d brown jr
Honored Contributor

Re: Business Basic buffering problem?

Brad,

I just did a test, using telnet, and I found that min and time changed like yours did only after I envoked "vi". WEIRD!!!!!!!

In my normal rlogin (rexec) I don't have a min and time in stty!

I can't wait to hear why this happens!


live free or die (unless you are a prisoner)
harry
Live Free or Die
A. Clay Stephenson
Acclaimed Contributor

Re: Business Basic buffering problem?

Hi Brad:

I have a theory. I would have first said that they are in their ioctl call they are using TCSETA rather than TCSETAW or TCSETAF to not allow the output to drain before resetting the terminal. However, your 3 chars does ring a bell. If timeslice is set to 1, a context switch may occur before the next character is seen so that cursor keypresses are missed. The other thing to ask them is how VMIN is set.
However, the first thing I would do is look at your current timeslice value, if yours is 1 rather than the suggested 10, that would explain why they can't reproduce the problem.

You might mention to them, that especially on older UNIX implementations. One ioctl called with TCSET (or TCSETA) might not work but three in a row worked everytime. I have seen problems very similar to this and the 3 in a row ioctl calls cleared it up and it the worse case does no harm.

Regards, Clay
If it ain't broke, I can fix that.
Brad Marks
Super Advisor

Re: Business Basic buffering problem?

Jeff, you da man!
At first I wasn't going to even try resize 'cuz when I looked at the man page for it, xterm was mentioned. I'm not using X-Windows but, instead, just a dumb ol' vt220 emulator in character mode. But then I said "Why not try"? And it worked!!!!!

Harry, Something interesting; my time is also changed by doing the resize. But this time the values are different:
$ diff stty1 stty2
3c3
< min = 4; time = 0;
---
> min = 6; time = 1;
$

Anyway, I want ALL of you to know that without you all, my employer would probably find out what a marginal sysamdin I really am!

Thanks again,
Brad
It's not impossible -- it'll just cost more...