void
fhandler_pty_slave::setup_locale (void)
{
+ if (get_ttyp ()->term_code_page != 0)
+ return;
+
char locale[ENCODING_LEN + 1] = "C";
char charset[ENCODING_LEN + 1] = "ASCII";
LCID lcid = get_langinfo (locale, charset);
// fork_fixup (parent, inuse, "inuse");
// fhandler_pty_common::fixup_after_fork (parent);
report_tty_counts (this, "inherited", "");
-
- /* Set locale */
- if (get_ttyp ()->term_code_page == 0)
- setup_locale ();
}
void
}
}
+ /* Set locale */
+ setup_locale ();
+
/* Hook Console API */
if (get_pseudo_console ())
{
}
}
+ if (!iscygwin ())
+ {
+ cfd.rewind ();
+ while (cfd.next () >= 0)
+ if (cfd->get_major () == DEV_PTYS_MAJOR)
+ {
+ fhandler_pty_slave *ptys =
+ (fhandler_pty_slave *)(fhandler_base *) cfd;
+ ptys->setup_locale ();
+ }
+ }
+
/* Set up needed handles for stdio */
si.dwFlags = STARTF_USESTDHANDLES;
si.hStdInput = handle ((in__stdin < 0 ? 0 : in__stdin), false,