Change use of BOOL, TRUE, FALSE to bool, true, false, as appropriate,

throughout.
* tty.cc (tty::common_init): Remove call to SetKernelObjectSecurity and edit
some comments.
* cygheap.h (init_cygheap::ctty): Add new element.
* devices.in (device::parse): Remove special handling for /dev/tty.
* devices.cc: Regenerate.
* dtable.cc (build_fh_pc): Don't reset /dev/tty device.  Let the device opener
do that.
* fhandler_termios.cc (tty_min::set_ctty): Redefine to _pinfo class.
* fhandler_tty.cc (fhandler_tty_common::set_close_on_exec): Avoid setting
noninherit flag for ctty.
* tty.h: Move BOOLs to bools.
(tty_min::set_ctty): Redeclare to _pinfo class.
* pinfo.cc (_pinfo::set_ctty): Define new function based on tty_min::set_ctty.
Change first argument from tty number to tty_min class.
* pinfo.h (_pinfo::set_ctty): Declare.
* fhandler_console.cc (fhandler_console::get_tty_stuff): Reflect move of
set_ctty to _pinfo class.
* fhandler_tty.cc (fhandler_tty_slave::open): Treat FH_TTY specially.  Use
saved cygheap value if it exists.  Otherwise convert to real device and save on
first time open.
(fhandler_tty_common::dup): Potentially set controlling tty if duping a slave
tty.
* syscalls.cc (setsid): Close controlling tty in cygheap.
* tty.cc: Change some BOOLs to bools.
This commit is contained in:
Christopher Faylor
2003-12-07 22:37:12 +00:00
parent 2e3ff06d3c
commit 2e008fb91f
41 changed files with 425 additions and 384 deletions

View File

@ -53,7 +53,7 @@ class lock_debug
muto NO_COPY *lock_debug::locker = NULL;
static bool __stdcall mark_closed (const char *, int, HANDLE, const char *, BOOL);
static bool __stdcall mark_closed (const char *, int, HANDLE, const char *, bool);
void
debug_init ()
@ -167,7 +167,7 @@ debug_fixup_after_fork_exec ()
}
static bool __stdcall
mark_closed (const char *func, int ln, HANDLE h, const char *name, BOOL force)
mark_closed (const char *func, int ln, HANDLE h, const char *name, bool force)
{
handle_list *hl;
lock_debug here;
@ -179,7 +179,7 @@ mark_closed (const char *func, int ln, HANDLE h, const char *name, BOOL force)
system_printf ("attempt to close protected handle %s:%d(%s<%p>) winpid %d",
hl->func, hl->ln, hl->name, hl->h, hl->pid);
system_printf (" by %s:%d(%s<%p>)", func, ln, name, h);
return FALSE;
return false;
}
handle_list *hln;
@ -193,19 +193,19 @@ mark_closed (const char *func, int ln, HANDLE h, const char *name, BOOL force)
if (hl)
delete_handle (hl);
return TRUE;
return true;
}
/* Close a known handle. Complain if !force and closing a known handle or
if the name of the handle being closed does not match the registered name. */
BOOL __stdcall
close_handle (const char *func, int ln, HANDLE h, const char *name, BOOL force)
bool __stdcall
close_handle (const char *func, int ln, HANDLE h, const char *name, bool force)
{
BOOL ret;
bool ret;
lock_debug here;
if (!mark_closed (func, ln, h, name, force))
return FALSE;
return false;
ret = CloseHandle (h);