diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2010-09-28 10:13:19 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2010-09-28 10:13:19 +0000 |
commit | 91e0b943a07e768bbdcd7d8da2b991eee41fc0c4 (patch) | |
tree | c97c4ba3db72afe7e84b30acae8b2e0df8bfb474 /winsup | |
parent | 41c91ad68dc733dfd1707b0947223223dfd7c318 (diff) | |
download | newlib-91e0b943a07e768bbdcd7d8da2b991eee41fc0c4.zip newlib-91e0b943a07e768bbdcd7d8da2b991eee41fc0c4.tar.gz newlib-91e0b943a07e768bbdcd7d8da2b991eee41fc0c4.tar.bz2 |
* fhandler_tty.cc (fhandler_pty_master::setup): Always create master
thread.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_tty.cc | 37 |
2 files changed, 22 insertions, 20 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index b673a0f..620e512 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,10 @@ 2010-09-28 Corinna Vinschen <corinna@vinschen.de> + * fhandler_tty.cc (fhandler_pty_master::setup): Always create master + thread. + +2010-09-28 Corinna Vinschen <corinna@vinschen.de> + * syscalls.cc (gethostid): Use correct path to ProductId registry value. 2010-09-27 Corinna Vinschen <corinna@vinschen.de> diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 52b264a..a919d14 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -1796,27 +1796,24 @@ fhandler_pty_master::setup (bool ispty) if (!(input_mutex = CreateMutex (&sa, FALSE, buf))) goto err; - if (ispty) + /* Create master control pipe which allows the master to duplicate + the pty pipe handles to processes which deserve it. */ + __small_sprintf (buf, "\\\\.\\pipe\\cygwin-%S-tty%d-master-ctl", + &installation_key, get_unit ()); + master_ctl = CreateNamedPipe (buf, PIPE_ACCESS_DUPLEX, + PIPE_WAIT | PIPE_TYPE_MESSAGE + | PIPE_READMODE_MESSAGE, 1, 4096, 4096, + 0, &sec_all_nih); + if (master_ctl == INVALID_HANDLE_VALUE) { - /* Create master control pipe which allows the master to duplicate - the pty pipe handles to processes which deserve it. */ - __small_sprintf (buf, "\\\\.\\pipe\\cygwin-%S-tty%d-master-ctl", - &installation_key, get_unit ()); - master_ctl = CreateNamedPipe (buf, PIPE_ACCESS_DUPLEX, - PIPE_WAIT | PIPE_TYPE_MESSAGE - | PIPE_READMODE_MESSAGE, 1, 4096, 4096, - 0, &sec_all_nih); - if (master_ctl == INVALID_HANDLE_VALUE) - { - errstr = "pty master control pipe"; - goto err; - } - master_thread = new cygthread (::pty_master_thread, this, "pty_master"); - if (!master_thread) - { - errstr = "pty master control thread"; - goto err; - } + errstr = "pty master control pipe"; + goto err; + } + master_thread = new cygthread (::pty_master_thread, this, "pty_master"); + if (!master_thread) + { + errstr = "pty master control thread"; + goto err; } t.from_master = from_master; |