[ANNOUNCEMENT] Updated: dash-0.5.8-3
Corinna Vinschen
corinna-cygwin@cygwin.com
Mon Feb 20 09:07:00 GMT 2017
On Feb 17 23:29, Thomas Wolff wrote:
> Am 17.02.2017 um 10:43 schrieb Corinna Vinschen:
> > On Feb 17 08:36, Thomas Wolff wrote:
> > > Am 16.02.2017 um 21:32 schrieb Thomas Wolff:
> > > > Am 16.02.2017 um 13:49 schrieb Corinna Vinschen:
> > > > > There's an ESC sequence to change the codeset? Do you mean the
> > > > > alternate codeset sequence \e[10m / \e[11m
> > > > Oh, that one! Thanks for mentioning, I had overlooked it and fixed
> > > > mintty now to consider it.
> > > > > or is there something more sophisticated?
> > > > I actually meant to adress
> > > > https://github.com/mintty/mintty/wiki/CtrlSeqs#locale and there is
> > > > also \e%G and \e%@.
> > > >
> > > > I just notice that later changing of the IUTF8 flag from the master
> > > > side does not seem to work on a Window 10 system (although it works
> > > > initially) while it does work on a Windows 7 system. Weird.
> > > Now tested on 2 Windows 7 systems and 2 Windows 10 systems. Does not
> > > work on Windows 10.
> > > Any idea?
> > Whatever you're observing, there's nothing Windows version-specific
> > here. The tcsetattr function indiscriminately copies the incoming
> > termios structure over. Maybe the bg_check function fails for some
> > reason? Can you strace setting the flag via tcsetattr?
> Attached. There are lots of strace output even without interaction. I've
> tried to isolate the switching moment tightly.
> > There should be some output from tcsetattr as well as from fhandler_termios::bg_check.
> >
> > Can you check?
> You mean the termios_printf trace? How would I activate it (without
> recompiling cygwin)?
Just use the -m option of strace. Have a look into strace --help, it's
explained quite thoroughly.
> 861 40124163 [main] bash 7384 fhandler_pty_slave::tcsetattr: (900): pty output_mutex (0x4AC): waiting -1 ms
> 54 40124217 [main] bash 7384 fhandler_pty_slave::tcsetattr: (900): pty output_mutex: acquired
> 48 40124265 [main] bash 7384 fhandler_pty_slave::tcsetattr: (902): pty output_mutex(0x4AC) released
> 54 40124319 [main] bash 7384 __set_errno: int tcsetattr(int, int, const termios*):158 setting errno 0
> 58 40124377 [main] bash 7384 tcsetattr: iflag 0x850A, oflag 0x9, cflag 0xBF, lflag 0xD1F, VMIN 1, VTIME 0
> 58 40124435 [main] bash 7384 tcsetattr: 0 = tcsetattr(0, 3, 0x6B1F1240)
Ok, so here you're setting iflags & ~IUTF8
> 34 40131547 [main] bash 7384 tcgetattr: iflag 0x850A, oflag 0x9, cflag 0xBF, lflag 0xD1F, VMIN 1, VTIME 0
confirmed by bash
> 35 40131582 [main] bash 7384 fhandler_pty_slave::tcsetattr: (900): pty output_mutex (0x4AC): waiting -1 ms
> 33 40131615 [main] bash 7384 fhandler_pty_slave::tcsetattr: (900): pty output_mutex: acquired
> 34 40131649 [main] bash 7384 fhandler_pty_slave::tcsetattr: (902): pty output_mutex(0x4AC) released
> 32 40131681 [main] bash 7384 __set_errno: int tcsetattr(int, int, const termios*):158 setting errno 0
> 33 40131714 [main] bash 7384 tcsetattr: iflag 0x840A, oflag 0x9, cflag 0xBF, lflag 0xD19, VMIN 1, VTIME 0
> 32 40131746 [main] bash 7384 tcsetattr: 0 = tcsetattr(0, 3, 0x6DC0D4)
And then bash sets iflags again, just to the same values as mintty had
set them before.
> 145 43721757 [main] mintty 9348 tcgetattr: iflag 0x840A, oflag 0x9, cflag 0xBF, lflag 0xD19, VMIN 1, VTIME 0
> 33 43721790 [main] mintty 9348 __set_errno: int tcsetattr(int, int, const termios*):158 setting errno 88
> 36 43721826 [main] mintty 9348 tcsetattr: iflag 0x2840A, oflag 0x9, cflag 0xBF, lflag 0xD19, VMIN 1, VTIME 0
> 36 43721862 [main] mintty 9348 tcsetattr: 0 = tcsetattr(3, 2, 0x66C774)
> 36 43721898 [main] mintty 9348 tcgetattr: iflag 0x2840A, oflag 0x9, cflag 0xBF, lflag 0xD19, VMIN 1, VTIME 0
And now mintty sets iflags | IUTF8. Hmm. Why does it do that here?
It's certainly too late for bash.
I can't see more, but setting and resetting the flag works as expected.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20170220/a07f99b1/attachment.sig>
More information about the Cygwin
mailing list