summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/fhandler_console.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2004-05-17 15:27:56 +0000
committerChristopher Faylor <me@cgf.cx>2004-05-17 15:27:56 +0000
commit641654f72a412df1dfe97890bdffbb8b5fa74eb2 (patch)
treea7e180f0c34ec1ff263e60f439777b0e5f3e5698 /winsup/cygwin/fhandler_console.cc
parentfb4489a53f1f770ac7159fb38dceb480b99fb1cc (diff)
downloadcygnal-641654f72a412df1dfe97890bdffbb8b5fa74eb2.tar.gz
cygnal-641654f72a412df1dfe97890bdffbb8b5fa74eb2.tar.bz2
cygnal-641654f72a412df1dfe97890bdffbb8b5fa74eb2.zip
Change the name "title_mutex" to "tty_mutex" throughout.
* tty.h (tty_list::allocate_tty): Turn argument into a boolean. * tty.cc (tty_list::init): Protect entire allocation operation with tty_mutex (formerly title_mutex) to protect against allocation races.
Diffstat (limited to 'winsup/cygwin/fhandler_console.cc')
-rw-r--r--winsup/cygwin/fhandler_console.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc
index 616090dfd..242182ec3 100644
--- a/winsup/cygwin/fhandler_console.cc
+++ b/winsup/cygwin/fhandler_console.cc
@@ -1776,10 +1776,10 @@ set_console_title (char *title)
char buf[257];
strncpy (buf, title, sizeof (buf) - 1);
buf[sizeof (buf) - 1] = '\0';
- if ((rc = WaitForSingleObject (title_mutex, 15000)) != WAIT_OBJECT_0)
+ if ((rc = WaitForSingleObject (tty_mutex, 15000)) != WAIT_OBJECT_0)
sigproc_printf ("wait for title mutex failed rc %d, %E", rc);
SetConsoleTitle (buf);
- ReleaseMutex (title_mutex);
+ ReleaseMutex (tty_mutex);
debug_printf ("title '%s'", buf);
}