* fhandler.h (fhandler_console::fixup_after_fork_exec): Declare new function.

(fhandler_console::fixup_after_fork): Use fixup_after_fork_exec.
(fhandler_console::fixup_after_exec): Ditto.
* fhandler_console.cc (fhandler_console::fixup_after_fork): Delete definition.
(fhandler_console::fixup_after_fork_exec): Rename from fixup_after_exec.
* pinfo.cc (_pinfo::set_ctty): Don't play with console count here.
* syscalls.cc (close_all_files): Don't close cygheap ctty if hExeced since the
child will be copying information from us.
(setsid): Use myctty() rather than raw ctty #.
This commit is contained in:
Christopher Faylor
2005-11-14 05:36:16 +00:00
parent 59297e0464
commit 5a0826c3f8
6 changed files with 24 additions and 40 deletions

View File

@@ -450,8 +450,7 @@ fhandler_tty_slave::open (int flags, mode_t)
{
if (get_device () == FH_TTY)
pc.dev.tty_to_real_device ();
fhandler_tty_slave *arch = (fhandler_tty_slave *)
cygheap->fdtab.find_archetype (pc.dev);
fhandler_tty_slave *arch = (fhandler_tty_slave *) cygheap->fdtab.find_archetype (pc.dev);
if (arch)
{
*this = *(fhandler_tty_slave *) arch;