[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: getch always returns -1 after shell
From: |
Thomas Dickey |
Subject: |
Re: getch always returns -1 after shell |
Date: |
Mon, 27 Jan 2003 20:35:15 -0500 |
User-agent: |
Mutt/1.3.27i |
On Mon, Jan 27, 2003 at 09:25:05PM -0500, jon wackley wrote:
>
> Hi Thomas,
>
> Yes I am using nodelay(stdscr, FALSE) to try to correct this problem.
> This seems to have no effect. I'm currently looking to determine if
> stdin is being closed or altered by the shell processing. I duped the
> stdio handles to /dev/null to see if this will change anything. If you
> have any suggestions further to this please feel free to let me know.
well here's a very simple example which works - a simple example that
doesn't would help focus:
#include <curses.h>
int main()
{
int ch;
initscr();
raw();
noecho();
while ((ch = getch()) != EOF) {
if (ch == '!') {
endwin();
system("sh -i");
refresh();
} else if (ch == '\033') {
break;
} else
addch(ch);
}
endwin();
return 0;
}
--
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net
- getch always returns -1 after shell, jon wackley, 2003/01/27
- Re: getch always returns -1 after shell, Thomas Dickey, 2003/01/27
- Re: getch always returns -1 after shell, jon wackley, 2003/01/27
- Re: getch always returns -1 after shell, jon wackley, 2003/01/27
- Re: getch always returns -1 after shell, Thomas Dickey, 2003/01/27
- Re: getch always returns -1 after shell, jon wackley, 2003/01/27
- Re: getch always returns -1 after shell, Thomas Dickey, 2003/01/28
Re: getch always returns -1 after shell, Tim Mooney, 2003/01/27