mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-02 04:20:28 +08:00
29d8a83008
- With this patch, all set_(in|out)put_mode() calls are rearranged as follows. 1) Setup for cygwin apps, started from non-cygwin app, is done in fhandler_console::post_open_setup(), which overrides fhandler_base::post_open_setup() called from dtable.cc. 2) Cleanup for cygwin app is done in fhandler_console::close(). 3) Setup for cygwin apps is also in fhandler_console::bg_check(), which overrides fhandler_termios::bg_check(). This is called on read(), write() and select() for console. It is necessary if cygwin and non-cygwin apps are started simultaneously in the same process group. 4) Setup for non-cygwin apps is done in spawn.cc via fhandler_console::setup_console_for_non_cygwin_app(). 5) Cleanup for non-cygwin app is done in spawn.cc vid fhandler_console::cleanup_console_for_non_cygwin_app(). 6) Setup for non-cygwin app started by GDB is done in fhandler_console::set_console_mode_to_native(). 7) No explicit cleanup for non-cygwin app started by GDB, because console mode is automatically reset to tty::cygwin on read()/ write() in GDB thanks to 3).
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cygwin documentation is available on the net at https://cygwin.com You might especially be interested in https://cygwin.com/faq/faq.html#faq.programming.building-cygwin