|
3 | 3 | * fhandler_tty.cc (fhandler_pty_slave::fch_close_handles): Don't close
|
4 | 4 | handles not opened via fhandler_pty_slave::fch_open_handles.
|
5 | 5 |
|
| 6 | +2015-04-22 Takashi Yano < [email protected]> |
| 7 | + |
| 8 | + * fhandler.h (class fhandler_base): Add virtual function |
| 9 | + get_io_handle_cyg() to get handle from which OPOST-processed output is |
| 10 | + read on PTY master. |
| 11 | + (class fhandler_pty_slave): Add variable output_handle_cyg to store a |
| 12 | + handle to which OPOST-processed output is written. Add two functions, |
| 13 | + i.e., set_output_handle_cyg() and get_output_handle_cyg(), regarding |
| 14 | + variable output_handle_cyg. Now, output_handle is used only by native |
| 15 | + windows program. The data before OPOST-processing is written to |
| 16 | + output_handle and OPOST-processing is applied in the master-side. For a |
| 17 | + cygwin process, OPOST-processing is applied in the slave-side, and the |
| 18 | + data after OPOST-processing is written to output_handle_cyg. |
| 19 | + (class fhandler_pty_master): Add two variables, i.e., io_handle_cyg and |
| 20 | + to_master_cyg, to store handles of a pipe through which OPOST-processed |
| 21 | + output passes. Add pty_master_fwd_thread and function |
| 22 | + pty_master_fwd_thread() for a thread which applies OPOST-processing |
| 23 | + and forwards data from io_handle to to_master_cyg. Add function |
| 24 | + get_io_handle_cyg() regarding variable io_handle_cyg. Now, the pipe |
| 25 | + between io_handle and to_master are used only by native windows program |
| 26 | + for applying OPOST-processing in the master-side. For a cygwin process, |
| 27 | + the pipe between io_handle_cyg and to_master_cyg is used for passing |
| 28 | + through the data which is applied OPOST-processing in the slave-side. |
| 29 | + * fhandler_tty.cc (struct pipe_reply): Add member to_master_cyg. |
| 30 | + (fhandler_pty_master::process_slave_output): Read slave output from |
| 31 | + io_handle_cyg rather than io_handle. |
| 32 | + (fhandler_pty_slave::fhandler_pty_salve): Initialize output_handle_cyg. |
| 33 | + (fhandler_pty_slave::open): Set output_handle_cyg by duplicating handle |
| 34 | + to_master_cyg on PTY master. |
| 35 | + (fhandler_pty_slave::close): Close handle output_handle_cyg. |
| 36 | + (fhandler_pty_slave::write): Write data to output_handle_cyg rather |
| 37 | + than output_handle. |
| 38 | + (fhandler_pty_slave::fch_close_handles): Close handle output_handle_cyg. |
| 39 | + (fhandler_pty_master::fhandler_pty_master): Initialize io_handle_cyg, |
| 40 | + to_master_cyg and master_fwd_thread. |
| 41 | + (fhandler_pty_master::cleanup): Clean up to_master_cyg as well. |
| 42 | + (fhandler_pty_master::close): Print to_master_cyg as well in debug |
| 43 | + message. Terminate master forwarding thread. Close handles |
| 44 | + to_master_cyg and io_handle_cyg. |
| 45 | + (fhandler_pty_master::ioctl): Use io_handle_cyg rather than to_master. |
| 46 | + (fhandler_pty_master::pty_master_thread): Add code for duplicating |
| 47 | + handle to_master_cyg. |
| 48 | + (fhandler_pty_master::pty_master_fwd_thread): New function for a thread |
| 49 | + to forward OPOST-processed data from io_handle to to_master_cyg. This |
| 50 | + thread applies OPOST-processing to the output of native windows program. |
| 51 | + (::pty_master_fwd_thread): Ditto. |
| 52 | + (fhandler_pty_master::setup): Create a new pipe to pass thruegh OPOST- |
| 53 | + processed output. Create new thread to forward data from io_handle to |
| 54 | + to_master_cyg. Set handle to_master_cyg to tty. Print io_handle_cyg as |
| 55 | + well in debug message. Close handles io_handle_cyg and to_master_cyg in |
| 56 | + case of error. |
| 57 | + (fhandler_pty_master::fixup_after_fork): Set handle to_master_cyg to |
| 58 | + tty. Copy handle to_master_cyg from arch->to_master_cyg. |
| 59 | + (fhandler_pty_master::fixup_after_exec): Clean up to_master_cyg. |
| 60 | + * select.cc: Check handle returned by get_io_handle_cyg() rather than |
| 61 | + get_handle(). |
| 62 | + * tty.h (class tty): Add variable _to_master_cyg to store a handle to |
| 63 | + which OPOST-processed data is written. Add two functions, |
| 64 | + to_master_cyg() and set_to_master_cyg(), regarding _to_master_cyg. |
| 65 | + |
6 | 66 | 2015-04-22 Corinna Vinschen < [email protected]>
|
7 | 67 |
|
8 | 68 | * path.cc (basename): Undefine basename before defining function to
|
|
0 commit comments