From: sos AT prospect DOT com DOT ru (Sergey Okhapkin) Subject: RE: tty.cc fix. 15 Feb 1998 23:24:33 -0800 Message-ID: <01BD3AC4.7157C360.cygnus.cygwin32.developers@gater.krystalbank.msk.ru> Reply-To: cygwin32-developers AT cygnus DOT com To: "'Ian Lance Taylor'" Cc: "cygwin32-developers AT cygnus DOT com" Ian Lance Taylor wrote: > From: Sergey Okhapkin > 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.