Mail Archives: cygwin-developers/1998/02/15/23:24:33
Ian Lance Taylor wrote:
> From: Sergey Okhapkin <sos AT buggy DOT prospect DOT com DOT ru>
> Date: Sun, 15 Feb 1998 19:35:16 +0300
>
> tty.cc (fhandler_tty_slave::open): call DuplicateHandle() instead of
copying.
>
> This patch looks wrong. It looks like it will break the EOF handling.
> You have to remember that the whole point of the handle manipulation
> in tty.cc is so that when the slave is closed, the pipe is closed. If
> there is somewhere I need to add comments, please let me know.
The code in fhandler_tty_slave::close() closes _both_ fhandler's internal
handles and ttyp pointed. I see no difference in expect's behavior with and
without this patch, but with this patch it's safe to open/close tty slave
in pty_master owner process.
--
Sergey Okhapkin, http://www.lexa.ru/sos
Moscow, Russia
Looking for a job.
- Raw text -