summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/fhandler_console.cc
Commit message (Collapse)AuthorAgeFilesLines
* Replace bogus resize-window-to-clear-screen logic.cygnal-release-2.5.2Kaz Kylheku2016-07-271-30/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes (ab)uses of SetConsoleScreenBufferSize which sometimes cause cmd.exe to badly misbehave. It probably doesn't like the closely spaced timing of shrinking the window down to one line followed by a restore of the size. Instead we just output newlines to clear the window. * winsup/cygwin/fhandler.h (dev_console::scroll_window): Member function declaration removed. (dev_console::clear_should_scroll): New member function declared. * winsup/cygwin/fhandler_console.cc (dev_console::scroll_window): Member function removed. (dev_console::clear_should_scroll): New member function. Performs only the test that was performed by scroll_window, not the actual scrolling. The scrolling is now done in the caller in the fhandler_console class. (fhandler_console::clear_screen): Call con.clear_should_scroll instead of con.scroll_window. If this returns false, act as before. Otherwise, clear the screen by scrolling the window. This is done not by making SetConsoleScreenBufferSize calls to shrink and restore the window, but by earnestly emitting a number of carriage returns equal to the vertical screen size and then restoring the cursor position.
* Console: integrate end-of-line hack with cursor positioning.Kaz Kylheku2016-07-261-8/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | The previous work for simulating the beyond-right-edge of screen cursor position is incomplete without integrating this into the cursor positioning routines. By making the cursor routines aware of the eat_newline flag, we allow cursor movements to work correctly with regard to this simulated position. * winsup/cygwin/fhandler_console.cc (fhandler_console::cursor_set): If the X position is beyond the right edge of the screen, then set the cursor to the start of the following line, rather than clipping to the right edge, set the eat_newline flag, indicating that the the true position is actually one character beyond the previous line. In all other cases, clear the eat_newline flag. (fhandler_console::cursor_rel): Do not apply the delta vector to the raw Win32 cursor position; call cursor_get and apply it to the virtual cursor position which takes into account the eat_newline flag. (fhandler_console::cursor_get): Take into account the eat_newline flag. If it is set, then report an adjusted position that is one column beyond the end of the previous line.
* Fix previous VT100 fix.Kaz Kylheku2016-07-021-11/+11
| | | | | | | | | We must only set or clear the eat_newline flag if we output something. * winsup/cygwin/fhandler_console.cc (fhandler_console::write_normal): Move the flag setting code inside the if statement which performs output.
* Console: provide VT100-like end-of-line print behavior.Kaz Kylheku2016-07-011-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On the majority of VT100-like terminals, when you print a character in the last column, the cursor sits in a kind of "limbo", as if the cursor position were one column past the edge of the screen. Thus when a line feed is output next, the cursor is then at the start of the next line. The Win32 console write doesn't do this; the cursor position wraps to the start of the next line. If a newline is put out, it translates to an extra newline going to the next-next line. This spoils the behavior of programs which depend on the VT100 behavior. In this patch, the VT100 behavior is simulated as follows. A new flag in the dev_console structure is set when a character is output to the last column. This flag is then observed in order to discard a newline (or rather any character which is mapped mapped to the DWN action). * winsup/cygwin/fhandler.h (class dev_console): New boolean data member, eat_newline. This indicates that if a character is output which moves down to the next line, it should be discarded rather than sent to the console. * winsup/cygwin/fhandler_console.cc (fhandler_console::write_normal): Set the eat_newline flag if the text output ends up at column zero. Honor the eat_newline flag when processing a DWN character, and clear it when processing certain other control characters.
* Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout optioncygwin-2_5_2-releaseCorinna Vinschen2016-06-231-3/+0
| | | | | | | | | | | | | | Bump GPLv2+ to GPLv3+ for some files, clarify BSD 2-clause. Everything else stays under GPLv3+. New Linking Exception exempts resulting executables from LGPLv3 section 4. Add CONTRIBUTORS file to keep track of licensing. Remove 'Copyright Red Hat Inc' comments. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Revert "Debug printfs."Corinna Vinschen2016-03-201-9/+1
| | | | | | This reverts commit 9f82de59a07da145c177648fe474f19cd9def7a1. Revert accidental push
* Debug printfs.John Hood2016-03-201-1/+9
| | | | | | | * fhandler.cc (fhandler_base::get_readahead): Add debug code. * fhandler_console.cc (fhandler_console::read): Add debug code. * select.cc (pselect): Add debug code. (peek_console): Add debug code.
* Move get_nonascii_key into fhandler_console.John Hood2016-03-201-3/+1
| | | | | | | * fhandler.h (fhandler_console): Move get_nonascii_key() from select.c into this class. * select.cc (peek_console): Move get_nonascii_key() into fhandler_console class.
* Remove dead code from fhandler_console.Peter Foley2016-03-201-2/+0
| | | | | | | | | | | | | | | | | This if is unconditionally false, so remove it. winsup/cygwin/fhandler_console.cc: In member function 'bool dev_console::fillin(HANDLE)': winsup/cygwin/fhandler_console.cc:740:22: error: self-comparison always evaluates to false [-Werror=tautological-compare] if (b.dwSize.Y != b.dwSize.Y || b.dwSize.X != b.dwSize.X) ~~~~~~~~~~~^~~~~~~~~~~~~ winsup/cygwin/fhandler_console.cc:740:50: error: self-comparison always evaluates to false [-Werror=tautological-compare] if (b.dwSize.Y != b.dwSize.Y || b.dwSize.X != b.dwSize.X) ~~~~~~~~~~~^~~~~~~~~~~~~ winsup/cygwin/ChangeLog * fhandle_console.cc (fillin): remove dead code Signed-off-by: Peter Foley <pefoley2@pefoley.com>
* Make requested console reports workThomas Wolff2016-03-161-4/+18
| | | | | | | | | | | | | | | | | | | cf https://cygwin.com/ml/cygwin-patches/2012-q3/msg00019.html This enables the following ESC sequences: ESC[c sends primary device attributes ESC[>c sends secondary device attributes ESC[6n sends cursor position report * fhandler.h (class dev_console): Add console read-ahead buffer. (class fhandler_console): Add peek function for it (for select). * fhandler_console.cc (fhandler_console::setup): Init buffer. (fhandler_console::read): Check console read-aheader buffer. (fhandler_console::char_command): Put responses to terminal requests (device status and cursor position reports) into common console buffer (shared between CONOUT/CONIN) instead of fhandler buffer (separated). * select.cc (peek_console): Check console read-ahead buffer.
* Drop sys_cp_wcstombs and save two arguments per callCorinna Vinschen2015-12-181-2/+1
| | | | | | | | | * strfuncs.cc (sys_cp_wcstombs): Delete and move functionality into sys_wcstombs. * wchar.h (sys_cp_wcstombs): Drop declaration. * fhandler_console.cc (dev_console::con_to_str): Call sys_wcstombs. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* * signal.cc (sigprocmask): Fix strace output to include "how".Christopher Faylor2014-05-091-5/+7
| | | | | * fhandler_console.cc (dev_console::save_restore): Only current dwEnd line rather than the one after that.
* * DevNotes: Add entry cgf-000026.Christopher Faylor2014-04-261-1/+8
| | | | | | | * fhandler.h (fhandler_console::save_top): Save top of screen coordinates. * fhandler_console.cc (dev::save_restore): Record top of screen coordinates. Clear entire buffer when restoring saved buffer and try to position the cursor on the save relative place on the screen.
* * fhandler.h (dev_console::b): Redefine as CONSOLE_SCREEN_BUFFER_INFO for useChristopher Faylor2014-03-101-2/+1
| | | | | | with older OS. * fhandler_console.cc (dev_console::fillin): Ditto for GetConsoleScreenBufferInfo.
* * fhandler_console.cc (dev_console::save_restore): Save entire line of currentChristopher Faylor2014-03-101-1/+2
| | | | cursor position.
* * fhandler_console.cc (fhandler_console::save_restore): Save only until lastChristopher Faylor2014-03-101-18/+14
| | | | | | | written row and, because of this, don't bother trying to restore the screen buffer size. Set cursor position after refilling buffer. (fhandler_console::write): Use absolute paths when saving/restoring cursor position or suffer odd problems after a saved screen is restored.
* * fhandler.h (fhandler_console::dwBufferSize): Delete.Christopher Faylor2014-03-091-354/+359
| | | | | | | | | | | | | | | | | | | | (fhandler_console::dwCursorPosition): Ditto. (fhandler_console::wAttributes): Ditto. (fhandler_console::b): New field encompassing previously disparate screen buffer info. (fhandler_console::save_bufsize): Rename from savebufsiz (fhandler_console::save_buf): Rename sfrom savebuf. (fhandler_console::save_cursor): New field. (fhandler_console::save_restore): New function. (fhandler_console::con): Rename from dev_state. (fhandler_console::focus_aware): Accommodate name change. * fhandler_console.cc: Use 'b' field of dev_console throughout instead of disparate names. Accommodate dev_state -> con rename. (dev_state:save_restore): New function. Attempt to save the entire screen buffer rather than just the visible part. Clear the buffer when saving, like Linux. (fhandler_console::char_command): Use con.save_restore() for Save/restore screen sequence.
* * fhandler_console.cc (fhandler_console::char_command): Properly use calculatedChristopher Faylor2014-03-091-1/+1
| | | | value rather than directly using dev_state.args[0].
* * fhandler.h (fhandler_console::scroll_buffer_screen): New function.Christopher Faylor2014-02-261-15/+15
| | | | | | * fhandler_console.cc (fhandler_console::scroll_buffer_screen): New function. (fhandler_console::char_command): Use scroll_buffer_screen as appropriate. (dev_console::scroll_buffer): Remove if 0'ed block.
* * dev_console::scroll_buffer): Reinstate clipping region.Christopher Faylor2014-02-231-1/+1
|
* * fhandler.h (dev_console::is_fullscreen): Delete.Christopher Faylor2014-02-231-54/+72
| | | | | | | | | | | | | | | | | | | | | | | (dev_console::scroll_window): Return bool indicating success. (dev_console::scroll_screen): New function. (dev_console::clear_screen): New function. (fhandler_console::clear_screen): Make __reg3. (fhandler_console::cursor_set): Ditto. (fhandler_console::cursor_get): Ditto. (fhandler_console::cursor_rel): Ditto. * fhandler_console.cc (dev_console::scroll_buffer): Adapt from fhandler_console. (fhandler_console::scroll_buffer): Use dev_console function. (dev_console::is_fullscreen): Delete. (dev_console::scroll_window): Return true if we cleared the screen. Shrink/grow buffer first before scrolling to ensure that there is sufficient space after scrolling. (fhandler_console::clear_screen): Make reg3, use dev_console function. (dev_console::clear_screen): New function adapted from fhandler_console. (fhandler_console::cursor_set): Make __reg3. (fhandler_console::cursor_rel): Ditto. (fhandler_console::cursor_get): Ditto. (fhandler_console::write): Fix "reverse index".
* * DevNotes: Add entry cgf-000024.Christopher Faylor2014-02-161-152/+173
| | | | | | | | | | | | | | | | | | | | | | | | | * fhandler.h (dev_console::state): Remove trailing underscore. (dev_console::args): Ditto. (dev_console::nargs): Ditto. (dev_console::info): Eliminate subclass. (dev_console::dwEnd): New field. (dev_console::scroll_window): New function. (dev_console::is_fullscreen): Ditto. (dev_console::fillin): Rename from fillin_info. (fhandler_console::scroll_buffer): Rename from scroll_screen. * fhandler_console.cc: Throughout s/dev_state\.info/dev_state/g. Accommodate other name changes. (dev_console::fillin): Accommodate rename. Notice max x/y written to. Forgo memset if GetConsoleScreenBufferInfo fails. (fhandler_console::scroll_buffer): Accommodate rename. Don't treat y coordinate of zero as top of screen. (dev_console::is_fullscreen): New function. (dev_console::scroll_window): Ditto. (fhandler_console::clear_screen): Just scroll the screen when clearing the screen in a state where the screen buffer is bigger than the screen. (fhandler_console::char_command): Try harder to get 'S' and 'T' working in the presence of a screen buffer. Use temporary 'n' variable rather than dev_state.args[0]. Use GNU ?: shortcut method.
* * fhandler.h (cltype): Add cl_buf_beg, cl_buf_end.Christopher Faylor2014-01-311-13/+17
| | | | | | | | * fhandler_console.cc (dev_console::console_attrs::set_cl_x): Honor buffer locations. (dev_console::console_attrs::set_cl_y): Ditto. (fhandler_console::write): On reset, use absolute positioning to go to beginning of buffer. Clear entire buffer.
* * fhandler.h: Update copyright.Christopher Faylor2014-01-041-104/+101
| | | | | | | | | | | | | | | | | | | (cltype): New enum. (dev_console::console_attrs): Define struct name. (dev_console::console_attrs::set_cl_x): New function. (dev_console::console_attrs::set_cl_y): New function. (fhandler_console::clear_screen): Redefine input params. * fhandler_console.cc: Update copyright. Throughout, reflect change in arguments to fhandler_console::clear_screeen. (fhandler_console::mouse_aware): Simplify logic slightly. (fhandler_console::scroll_screen): Remove hopefully obsolete win95 code. (dev_console::console_attrs::set_cl_x): New function. (dev_console::console_attrs::set_cl_y): New function. (fhandler_console::clear_screen): Redefine input params. Calculate position based on enum value. (region_split): Change arguments. Simplify. (ReadConsoleOutputWrapper): Remove coord argument since we now always use 0, 0. Send extra arguments to region_split.
* * fhandler_console.cc (region_split): New function.Christopher Faylor2013-12-311-11/+85
| | | | | | | (delta): Ditto. (ReadConsoleOutputWrapper): Ditto. (fhandler_console::char_command): Use ReadConsoleOutputWrapper to avoid OOM condition from ReadConsoleOutputW. Add more debugging.
* Throughout, drop unnecessary explicit includes of windows header filesCorinna Vinschen2013-11-241-3/+0
| | | | | | | | | | | | included by default. * winlean.h: Add long comment to explain why we have to define certain symbols. (_NORMALIZE_): Define. (_WINNLS_): Drop definition and subsequent undef. (_WINNETWK_): Ditto. (_WINSVC_): Ditto. 2013-11-23 Eric Blake <eblake@redhat.com>
* * external.cc (fillout_pinfo): If start_time is 0, wait a while beforeChristopher Faylor2013-10-241-0/+1
| | | | | | | | | | returning the pinfo structure. * fhandler.cc (fhandler_base::open_setup): Convert from inline. * fhandler.h (fhandler_base::open_setup): Declare. * fhandler_console.cc (fhandler_console::open_setup): Always call fhandler_base::open_setup. * fhandler_tty.cc (fhandler_pty_slave::open_setup): Ditto. (fhandler_pty_master::open_setup): Ditto.
* Throughout, (mainly in fhandler*) fix remaining gcc 4.7 mismatchYaakov Selkowitz2013-05-011-1/+1
| | | | | | | | | warnings between regparm definitions and declarations. * smallprint.cc (__small_vswprintf): Conditionalize declaration and setting of l_opt for only x86_64. * spawn.cc (child_info_spawn::worker): Remove unused 'pid' variable. * thread.cc (verifyable_object_isvalid): Temporarily define as non-inline with gcc 4.7+, regardless of target.
* * Merge in cygwin-64bit-branch.Corinna Vinschen2013-04-231-11/+11
|
* Throughout, update copyrights to reflect dates which correspond to main-branchChristopher Faylor2013-01-211-2/+2
| | | | checkins. Regularize copyright format.
* * fhandler.h (class dev_console): Flag for expanded control sequence.Corinna Vinschen2013-01-111-2/+45
| | | | * fhandler_console.cc (char_command): Supporting cursor style modes.
* whitespace cleanupChristopher Faylor2012-08-161-4/+4
|
* * cygwait.cc (cancelable_wait): Add some debugging-only output.Christopher Faylor2012-07-301-2/+1
| | | | | | | | | | | | | | | | | | | | * exceptions.cc (sig_handle_tty_stop): Make sure that incyg is cleared when exiting if we have no parent process. Only wait for signal_arrived. (sigpacket::process): Make continue_now a bool. Delay sending signal_arrived until the end. Make code more defensive to avoid calling signal handler when stopped. Only set signal_arrived when stopped. * sigproc.cc (sig_hold): Rename from sigCONT. Make static. (sig_send): Accommodate sigCONT -> sig_hold rename. (wait_sig): Ditto. * sigproc.h (sigCONT): Delete declaration. * fhandler_console.cc (fhandler_console::write): Use new '%0c' facility to print characters. Change to paranoid to avoid excessive strace output. * fhandler_tty.cc (fhandler_pty_master::accept_input): Make frequent strace printf "paranoid" to help cut down on strace output size. * signal.cc (sigsuspend): Add standard syscall strace output. (sigpause): Ditto. (pause): Ditto. * cygtls.h (_cygtls::reset_signal_arrived): New function.
* Add '#include "cygwait.h"' throughout, where appropriate.Christopher Faylor2012-06-171-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * DevNotes: Add entry cgf-000012. * Makefile.in (DLL_OFILES): Add cygwait.o. * sigproc.h: Remove cygwait definitions. * cygwait.h: New file. Define/declare Cygwin waitfor functions. * cygwait.cc: Ditto. * exceptions.cc: Include cygwait.h. (handle_sigsuspend): Accommodate change in cancelable_wait arguments. (sigpacket::process): Display thread tls in debugging output. * fhandler.cc (fhandler_base_overlapped::wait_overlapped): Use symbolic names for signal and cancel return. * fhandler_console.cc (fhandler_console::read): Ditto. (fhandler_dev_dsp::Audio_out::waitforspace): Ditto. fhandler_dev_dsp::Audio_in::waitfordata): Ditto. * fhandler_fifo.cc (fhandler_fifo::wait): Ditto. * fhandler_serial.cc (fhandler_serial::raw_read): Ditto. * fhandler_tty.cc (fhandler_pty_slave::read): Ditto. * select.cc (cygwin_select): Ditto. * wait.cc (wait4): Ditto. * thread.cc (cancelable_wait): Move definition to cygwait.h. (pthread_cond::wait): Accommodate change in cancelable_wait arguments. (pthread_mutex::lock): Ditto. (pthread_spinlock::lock): Ditto. (pthread::join): Ditto. (pthread::thread_init_wrapper): Display tls in debugging output. (semaphore::_timedwait): Ditto. * thread.h (cw_sig_wait): Move to cygwait.h. (cw_cancel_action): Delete. (cancelable_wait): Move declaration to cygwait.h.
* * fhandler.h (class dev_console): Add member ext_mouse_mode5.Corinna Vinschen2012-04-251-10/+29
| | | | | | * fhandler_console.cc (fhandler_console::read): Implement extended mouse mode 1005 (xterm, mintty). Fix actual mouse reporting for large coordinates.
* * fhandler_console.cc (ALT_PRESSED): Define earlier, never undefine.Corinna Vinschen2012-04-241-10/+7
| | | | | | | (CTRL_PRESSED): Ditto. (fhandler_console::read): Simplify expressions testing for pressed ALT or CTRL modifier keys. (get_nonascii_key): Ditto.
* * fhandler.h (class dev_console): Add members ext_mouse_mode6 andCorinna Vinschen2012-04-241-23/+66
| | | | | | | | | | ext_mouse_mode15. * fhandler_console.cc (fhandler_console::read): Implement extended mouse modes 1015 (urxvt, mintty, xterm) and 1006 (xterm). Recognize, but don't implement extended mouse mode 1005 (xterm, mintty). Support mouse coordinates greater than 222 (each axis). Fix formatting. (fhandler_console::char_command): Initialize enhanced mouse reporting modes.
* wincap.h: Rename assitant to assistant throughout. wincap.cc: Ditto.Christopher Faylor2012-04-151-1/+1
| | | | | | | | | | | | | * devices.in (exists_console): Use fhandler_console::exists () rather than raw test. * devices.cc: Regenerate. * fhandler.h (fhandler_console::exists): Define new function. * fhandler_console.cc (fhandler_console::need_invisible): Use fhandler_console::exists () rather than raw test. * spawn.cc: Rename assitant to assistant throughout. (child_info_spawn::worker): Simplify test for when to start a non-Cygwin process in its own process group. Just do it whenever we start a non-Cygwin process.
* * devices.in (exists_console): Allow /dev/con{sole,in,out} to be referencedChristopher Faylor2012-04-131-3/+4
| | | | | | they exist. * devices.cc: Regenerate. * fhandler_console.cc (fhandler_console::set_unit): Ditto.
* * dtable.cc (dtable::fixup_close): Define new function.Christopher Faylor2012-04-011-5/+8
| | | | | | | | | | | (dtable::fixup_after_exec): Use fixup_close() and detect when it was not possible to open an inherited file handle. (dtable::fixup_after_fork): Defensively close any file handles which were not, for some reason, inheritable. * dtable.h: Make #pragma once. (dtable::fixup_close): Declare new function. * fhandler_console.cc (fhandler_console::set_unit): Set I/O handles to NULL when this function fails.
* * fhandler_console.cc (fhandler_console::set_unit): Don't succeed unless we areChristopher Faylor2012-03-291-1/+7
| | | | opening a console actually associated with this process.
* * dtable.cc (fh_alloc): Treat pc.dev as unsigned.Christopher Faylor2012-03-101-4/+2
| | | | | * fhandler_console.cc (fhandler_console::set_unit): Use lock always to avoid races between competing cygwin processes running on the console.
* * Throughout, replace usage of w32api's min with MIN from sys/param.h.Corinna Vinschen2012-03-081-1/+2
|
* * fhandler_console.cc (fhandler_console::dup): Only set ctty when we haven'tChristopher Faylor2012-03-031-1/+3
| | | | | | | | | specifically called setsid. * fhandler_tty.cc (fhandler_pty_slave::dup): Ditto. Also add comment documenting research into rxvt problem. * fhandler_termios.cc (fhandler_termios::tcsetpgrp): Don't check specifically for myself->ctty == -1. Test for > 0 as that is the correct test. (fhandler_termios::sigflush): Ditto.
* * fhandler_console.cc (fhandler_console::input_tcsetattr): RevertCorinna Vinschen2012-03-021-4/+2
| | | | | | | prevois patch. (fhandler_console::open_setup): Install Ctrl-C handler here, if this console is the controlling tty and the process hasn't been started by a Cygwin process.
* * fhandler_console.cc (fhandler_console::input_tcsetattr): Set theCorinna Vinschen2012-03-021-0/+3
| | | | | state of the Ctrl-C handler depending on the setting of ENABLE_PROCESSED_INPUT.
* * cygheap.cc (init_cygheap::init_installation_root): Convert functionCorinna Vinschen2012-02-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | init_installation_root into a cygheap method. * cygheap.h (struct init_cygheap): Move installation_root, installation_key, and installation_key_buf from shared .cygwin_dll_common DLL section to cygheap. Declare new method init_installation_root. * dtable.cc (handle_to_fn): Accommodate the move of installation strings to the cygheap. * external.cc (cygwin_internal): Ditto. * fhandler_console.cc (fhandler_console::open_shared_console): Ditto. * fhandler_mailslot.cc (fhandler_mailslot::get_object_attr): Ditto. * fhandler_tty.cc: Ditto, throughout. * mount.cc (mount_info::init): Ditto. * pipe.cc (fhandler_pipe::create): Ditto. * shared.cc: Ditto, throughout. (installation_root): Remove. (installation_key): Move to cygheap. (installation_key_buf): Ditto. (installation_root_inited): Remove. (SPIN_WAIT): Remove. (init_installation_root): Move to cygheap. (memory_init): Call cygheap->init_installation_root right after cygheap->user.init. Drop call of init_installation_root function. * shared_info.h (init_installation_root): Drop declaration. (installation_root): Ditto. (installation_key): Ditto. * uinfo.cc (pwdgrp::load): Accommodate the move of installation strings to the cygheap.
* * cygheap.cc (init_cygheap::manage_console_count): Delete.Christopher Faylor2012-02-071-3/+10
| | | | | | | | | | | | | | | | | | | * cygheap.h (init_cygheap::manage_console_count): Ditto. (init_cygheap::console_count): Ditto. * fhandler.h (fhandler_console::has_a): Ditto. (fhandler_console::free_console): Declare new function. * fhandler_console.cc (fhandler_console::free_console): Define new function. (fhandler_console::open_setup): Delete call to manage_console_count. (fhandler_console::close): Ditto. Replace with call to free_console(). * fhandler_tty.cc (fhandler_pty_slave::open): Delete call to manage_console_count. (fhandler_pty_slave::cleanup): Ditto. (fhandler_pty_slave::close): Call fhandler_console::free_console() if this is our controlling tty. * pinfo.cc (_pinfo::set_ctty): Skip function if tty in question == our ctty. Delete call to manage_console_count. * syscalls.cc (close_all_files): Avoid locking and avoid setting errno when iterating over fds.
* Clean up whitespace.Christopher Faylor2011-12-171-1/+1
|
* * cygthread.h (cygthread::name): Very minor formatting tweak.Christopher Faylor2011-12-131-3/+0
| | | | | | | | | | | | | | | | * exceptions.cc (_cygtls::call_signal_handler): Add paranoid debugging output. * sigproc.h (cygwait): Call signal handler when signal is detected and loop as appropriate. * fhandler.h (fhandler_base_overlapped::wait_return): Remove overlapped_signal. * fhandler.cc (fhandler_base_overlapped::wait_overlapped): Remove restartable signal accommodations in light of cygwait improvements. (fhandler_base_overlapped::raw_read): Remove now-obsolete signal loop behavior. (fhandler_base_overlapped::raw_write): Ditto. * fhandler_console.cc (fhandler_console::read): Ditto. * fhandler_serial.cc (fhandler_serial::raw_read): Ditto. (fhandler_serial::raw_write): Ditto. * fhandler_tty.cc (fhandler_pty_slave::read): Ditto. * ioctl.cc (ioctl): Add standard syscall introducer and leaver debug output.