My console rewrite is finally available

Sergey Okhapkin
Fri Mar 26 04:39:00 GMT 1999

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) {
                        if (p < nbuf + UT_NAMESIZE)
                                *p++ = ch;

Looks like getchar() returns \r instead of \n now.

Sergey Okhapkin,
Piscataway, NJ

More information about the Cygwin-developers mailing list