[comp.unix.programmer] ^Z problem in curses

theorem@blake.u.washington.edu (Adrian Mariano) (09/21/90)

I have a program that uses the curses I/O interface.  When it is
run from another program
     sh -c "myprogram..."
for example, ^Z doesn't always work properly.  Sometimes it works ok, 
moving the cursor to the bottom of the screen and saying 'Stopped' but
sometimes, it doesn't relocate the cursor, and prints "Stopped" on
top of the text on the screen.  A subsequent 'fg' does not resume.  Rather,
"Stopped" is printed at the bottom of the screen.  A SECOND 'fg' resumes
normally.

Can anybody tell me how to fix this?