Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-Id: <3.0.5.32.20021015231109.008125d0@h00207811519c.ne.client2.attbi.com> X-Sender: pierre AT h00207811519c DOT ne DOT client2 DOT attbi DOT com Date: Tue, 15 Oct 2002 23:11:09 -0400 To: cygwin AT cygwin DOT com From: "Pierre A. Humblet" Subject: Re: window problem with cygwin-3-13? In-Reply-To: <20021015175850.GB11619@redhat.com> References: <20021015091816 DOT GA784 AT ingber DOT com> <20021015091816 DOT GA784 AT ingber DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" At 01:58 PM 10/15/2002 -0400, Christopher Faylor wrote: >On Tue, Oct 15, 2002 at 05:18:16AM -0400, Lester Ingber wrote: >>Under cygwin-3-13, ispell does not respond to keystrokes >>The window seems to freeze. Under 3-12, it works as expected. > >so this will probably require more debugging on your part. The program below demonstrates the issue. After the second ioctl, getchar() becomes non-blocking and returns -1 even though it should (? I am not an expert on termio ...) wait for a character because of sbuf.c_cc[VMIN] = 1; It works as expected with 3-12. This is on WinME. Incidentally what's happening is that ispell is generating infinitely many "bells" while getting getchar() == -1. They can be heard on the console. Under rxvt this eventually causes fflush(stdout) to freeze. Pierre #include #include main () { struct termio sbuf; int c, n; ioctl (0, TCGETA, (char *) &sbuf); fprintf(stdout,"getchar\n"); while ((c = getchar()) != '\n') printf("%d ", c); fprintf(stdout, "\n"); sbuf.c_lflag &= ~ICANON; sbuf.c_cc[VMIN] = 1; sbuf.c_cc[VTIME] = 1; ioctl (0, TCSETAW, (char *) &sbuf); n = 0; fprintf(stdout,"getchar\n"); while (((n++ < 20) && (c = getchar()) != '\n')) printf("%d ", c); fprintf(stdout, "\n"); sbuf.c_lflag |= ICANON; ioctl (0, TCSETAW, (char *) &sbuf); } -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/