Curses problem

Boyd Hays blh at nbires.nbi.com
Wed Sep 21 08:32:51 AEST 1988


Help,
    I am trying to write a driver program to control a curses-based
    application over a pty-tty connection.  The setup looks like:

	MY Code					Curses Application
	1. find a free tty/pty pair
	2. put the found tty side of
	   the tty/pty in cbreak mode.
	3. fork
	   3a. 	child side exec's curses	Starts running here
	       	program.
	   3b. 	parent reads output of		Applications sends out
		child from pty side and		initialization messages
		waits for child to quit		eventually reaching some
		sending out initiazation	steady-state.
		messages.
		parent issues writes over
		the pty to control the child
		application.
		SUBSEQUENT READS DO NOT SEE	I suspect it never sees
		ANY ACTIONS ON THE PART OF	any of the characters I
		THE CHILD.			am sending it, so it sits
						there idle.
    
    So, the problem would appear that the forked process is not seeing
    any of the characters I am sending it. I can however read just fine
    from the pty.  I am certain the receiving tty is in cbreak mode (I
    modified stty to allow me to look at its tty characteristics). I've
    tried writing large amounts of data to the remote process thinking
    my writes were being buffered but to no avail. I've tried not re-
    programming the tty and letting curses take care of it during its
    initialization, that doesn't work either.

    This problem is present regardless of the curses application I run.
    My application, vi, and a 10 line curses program all have the same
    symptoms.

    This code is running, or I should say not running, on an Integrated 
    Solutions 4.3 BSD system.  Does anyone out there have a clue as to
    what the problem could be.  Thanks in advance.

    Boyd Hays 	(blh at nbires.nbi.com)
    303/444-5710

-- 
blh at nbires.nbi.com



More information about the Comp.unix.questions mailing list