This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: ioctl calls with latest coolview

In article <>,
Ian Collins  <> wrote:
>I had a little test program that uses ioctl to set a terminal into raw
>mode.  It has always worked fine until I installed the latest coolview
>from Sergeys page.  It now calls the TCGETA fail (see below).  After
>backing off to a previous version of coolview, it again works ok.
>Has anyone seen this behaviour? Any ideas?
>The C code is thus, (I know you don't need all the includes. It was
>taken from a larger program),
>#include <stdio.h>
>#include <string.h>
>#include <ctype.h>
>#include <fcntl.h>
>#include <unistd.h>
>#include <pwd.h>
>#include <termio.h>
>static struct termio tbufsave;
>  struct termio tbuf;
>  if (ioctl(0, TCGETA, &tbuf) == -1){
>    perror("kwrawmd: ioctl (TCGETA) fail ");
>    exit(1);
>  }
>  else {
>    printf("kwrawmd ok\n");
>      }
>  tbufsave = tbuf;

Two questions:

1) Are you setting CYGWIN_TTY=1?

2) What's the error reported by perror?
--			"Strange how unreal
VMS=>UNIX Solutions	Boston Business Computing	 the real can be."
For help on using this list (especially unsubscribing), send a message to
"" with one line of text: "help".

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]