From: Petr DOT Novak AT i DOT cz (Petr Novak) Subject: B19: fgets from /dev/tty with echo off broken 25 Sep 1998 20:07:39 -0700 Message-ID: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII To: gnu-win32 AT cygnus DOT com Hi, I was trying to port SSH-1.2.26 with minimal changes under cygwin32. I am using B19 tools & runtime. The major problem I have is that reading the passphrase from terminal fails and sometimes even freezes the Win95 kernel. I am using W95, I did not try Windows NT. When you turn echo off using tcsetattr and read a line using fgets, the fgets works fine while reading from stdin assigned to console, but loops until the buffer is overflown while reading from FILE *p = fopen("/dev/tty", "r"). It might have something to do with CRLF conversion not being done properly, as the fgets routine expects to find a \n or fills up the buffer. Pressing CTRL-BREAK or CTRL-C sometimes stops the program with signal 2, sometimes does not produce any result (and it is possible to close the BASH window from which the process was started) and sometimes hangs the whole W95 kernel. Any idea where the problem is? I was trying to debug the fgets, ___fill... and other routines, but I was not able to do it properly. Thanks in advance, -- Petr Novak ICZ a.s. Zirovnicka 6 CZ-106 00 Praha 10 Ph: +420 2 2424 5124 Fax: +420 2 2424 5125 - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".