Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Cygwin, zpty and EOL
- X-seq: zsh-workers 12182
- From: "Andrej Borsenkow" <Andrej.Borsenkow@xxxxxxxxxxxxxx>
- To: "ZSH workers mailing list" <zsh-workers@xxxxxxxxxxxxxx>
- Subject: Cygwin, zpty and EOL
- Date: Thu, 6 Jul 2000 19:21:07 +0400
- Importance: Normal
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Trying to make nslookup work on Cygwin ...
Cygwin can work with tty in two different modes. In binary mode all
characters are transmitted "as is", that corresponds to normal Unix
behaviour. In text mode EOL is converted between NL (Unix) and CR-NL
(DOS). Important is, as I understand, it is done by cygwin.dll, and
applies only to Cygwin programs.
Unfortunately, nslookup on NT is external, NT program. When you start it
under zpty control, very funny thing happens:
- by default, terminal is set to "stty onlcr" mode (BTW the same is on
Unix and with Bash).
- nslookup, as DOS program, outputs CR-NL as EOL
- this is converted to CR-CR by pty (that interprets it as output, of
course)!
In other words, poor nslookup that waits for '*NL> ' never sees it ...
and what it gets is one large large line.
I was finally able to make it work by changing the pattern and replacing
CR-CR with single NL in input. Ough ...
This probably could be automated by examining full path to the command.
Now I wonder, if something similar happens with completion tests. So far
I noted very interesting thing - every ptyread() returns single line, at
the end of line I see read() that returns 0 (zero) bytes.
-andrej
Have a nice DOS!
B >>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author