read/write of handle is connected to a tty or console.
* fhandler_dsp.cc (fhandler_dev_dsp::dup): Set open flags correctly
after duplicating from archetype.
* fhandler_tty.cc (fhandler_tty_slave::dup): Ditto.
(fhandler_pty_master::dup): Ditto.
+2008-02-07 Corinna Vinschen <corinna@vinschen.de>
+
+ * dtable.cc (dtable::init_std_file_from_handle): Set access to
+ read/write of handle is connected to a tty or console.
+ * fhandler_dsp.cc (fhandler_dev_dsp::dup): Set open flags correctly
+ after duplicating from archetype.
+ * fhandler_tty.cc (fhandler_tty_slave::dup): Ditto.
+ (fhandler_pty_master::dup): Ditto.
+
2008-02-06 Corinna Vinschen <corinna@vinschen.de>
* miscfuncs.cc (next_char): Fix typos in comment.
}
DWORD access;
- if (fd == 0)
+ if (dev == FH_TTY || dev == FH_CONSOLE)
+ access = GENERIC_READ | GENERIC_WRITE;
+ else if (fd == 0)
access = GENERIC_READ;
else
access = GENERIC_WRITE; /* Should be rdwr for stderr but not sure that's
{
debug_printf ("");
child->archetype = archetype;
+ child->set_flags (get_flags ());
archetype->usecount++;
return 0;
}
{
fhandler_tty_slave *arch = (fhandler_tty_slave *) archetype;
*(fhandler_tty_slave *) child = *arch;
+ child->set_flags (get_flags ());
child->usecount = 0;
arch->usecount++;
cygheap->manage_console_count ("fhandler_tty_slave::dup", 1);
{
fhandler_tty_master *arch = (fhandler_tty_master *) archetype;
*(fhandler_tty_master *) child = *arch;
+ child->set_flags (get_flags ());
child->usecount = 0;
arch->usecount++;
report_tty_counts (child, "duped master", "");