diff options
Diffstat (limited to 'winsup/cygwin/pinfo.cc')
-rw-r--r-- | winsup/cygwin/pinfo.cc | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index 098b67e41..7350a00a1 100644 --- a/winsup/cygwin/pinfo.cc +++ b/winsup/cygwin/pinfo.cc @@ -315,6 +315,18 @@ pinfo::set_acl() debug_printf ("SetKernelObjectSecurity %E"); } +const char * +_pinfo::_ctty (char *buf) +{ + if (ctty == TTY_CONSOLE) + strcpy (buf, "ctty /dev/console"); + else if (ctty < 0) + strcpy (buf, "no ctty"); + else + __small_sprintf (buf, "ctty /dev/tty%d", ctty); + return buf; +} + void _pinfo::set_ctty (tty_min *tc, int flags, fhandler_tty_slave *arch) { @@ -353,8 +365,8 @@ _pinfo::set_ctty (tty_min *tc, int flags, fhandler_tty_slave *arch) if (arch) { arch->usecount++; - cygheap->open_fhs++; - report_tty_counts (cygheap->ctty, "ctty", "incremented ", ""); + cygheap->manage_console_count ("pinfo::set_ctty", 1); + report_tty_counts (cygheap->ctty, "ctty", ""); } } } |