diff options
author | Christopher Faylor <me@cgf.cx> | 2004-05-17 15:27:56 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2004-05-17 15:27:56 +0000 |
commit | 641654f72a412df1dfe97890bdffbb8b5fa74eb2 (patch) | |
tree | a7e180f0c34ec1ff263e60f439777b0e5f3e5698 /winsup/cygwin/exceptions.cc | |
parent | fb4489a53f1f770ac7159fb38dceb480b99fb1cc (diff) | |
download | cygnal-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/exceptions.cc')
-rw-r--r-- | winsup/cygwin/exceptions.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index 3b7be7042..44f37cbbe 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -330,7 +330,7 @@ try_to_debug (bool waitloop) /* if any of these mutexes is owned, we will fail to start any cygwin app until trapped app exits */ - ReleaseMutex (title_mutex); + ReleaseMutex (tty_mutex); /* prevent recursive exception handling */ char* rawenv = GetEnvironmentStrings () ; @@ -1117,22 +1117,22 @@ signal_exit (int rc) do_exit (rc); } -HANDLE NO_COPY title_mutex = NULL; +HANDLE NO_COPY tty_mutex = NULL; void events_init (void) { char *name; char mutex_name[CYG_MAX_PATH]; - /* title_mutex protects modification of console title. It's necessary + /* tty_mutex is on while searching for a tty slot. It's necessary while finding console window handle */ - if (!(title_mutex = CreateMutex (&sec_all_nih, FALSE, + if (!(tty_mutex = CreateMutex (&sec_all_nih, FALSE, name = shared_name (mutex_name, - "title_mutex", 0)))) + "tty_mutex", 0)))) api_fatal ("can't create title mutex '%s', %E", name); - ProtectHandle (title_mutex); + ProtectHandle (tty_mutex); new_muto (mask_sync); windows_system_directory[0] = '\0'; (void) GetSystemDirectory (windows_system_directory, sizeof (windows_system_directory) - 2); |