Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com X-Mozilla-Status2: 00000000 Message-ID: <36FC1ED0.281F104B@cityweb.de> Date: Sat, 27 Mar 1999 00:57:04 +0100 From: Corinna Vinschen X-Mailer: Mozilla 4.51 [de] (WinNT; I) X-Accept-Language: de,en MIME-Version: 1.0 To: Sergey Okhapkin CC: Chris Faylor , cygwin-developers AT sourceware DOT cygnus DOT com Subject: Re: My console rewrite is finally available References: <01BE775B DOT DFB62CA0 AT sos> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sergey Okhapkin wrote: > > Corinna Vinschen wrote: > > Unfortunately, your patch doesn't work together with Sergeys > > remote package. Setting: CYGWIN=binmode ntea tty > > > > The following happens: > > > > Open Connection, > > telnetd starts `login.exe'... > > ... which displays "login:" > > I enter the login and press return... > > the cursor jumps to the beginning of the _same_ line, > > instead of to the next line and now, login.exe hangs. > > Login reads username using the following loop (the code derived from linux login): > > printf("login: "); > for (p = nbuf; (ch = getchar()) != '\n'; ) { > if (ch == EOF) { > badlogin(username); > exit(0); > } > if (p < nbuf + UT_NAMESIZE) > *p++ = ch; > } > > Looks like getchar() returns \r instead of \n now. Seems to be a general binmode problem: If using a NT console window with CYGWIN="binmode notty", the newline is only LF, instead of CR/LF. If not in binmode, anything looks nice. Regards, Corinna