^Z problems with curses

Adrian Mariano theorem at blake.u.washington.edu
Thu Sep 20 11:19:33 AEST 1990


I have a program which uses curses for I/O.  When the program is run in
a subshell:
    sh -c "program..."
for example, ^Z behaves strangely.  It works properly part of the time, but
the rest of the time, pressing ^Z prints a "Stopped" message in the middle
of the screen instead of at the bottom.  A subsequent 'fg' produces
a "Stopped" message at the bottom of the screen.

The original program included signal handlers for SIGTSTP and SIGCONT, but
that version would fail catastrophically whenever ^Z was pressed if it
was run within a subshell.  (I had to log in again and use kill to get rid of
it)

For initialization, the program calls noecho() and crmode() (curses functions).

How can I get ^Z to work properly?

Send replies E-mail.



More information about the Comp.lang.c mailing list