mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-21 00:07:36 +08:00
Cygwin: pty: Rename input/output named pipes.
- Currently, names of output pipes are "pty%d-to-master" and "pty%d- to-master-cyg" and names of input pipes are "pty%d-to-slave" and "pty%d-from-master". With this patch, these pipes are renamed to "pty%d-to-master-nat", "pty%d-to-master", "pty%d-from-master-nat" and "pty%d-from-master" respectively.
This commit is contained in:
parent
d10d0d9b03
commit
ef05e8bdae
@ -2768,26 +2768,26 @@ fhandler_pty_master::setup ()
|
||||
termios_printf ("can't set output_handle(%p) to non-blocking mode",
|
||||
get_output_handle ());
|
||||
|
||||
char pipename[sizeof ("ptyNNNN-to-master-cyg")];
|
||||
__small_sprintf (pipename, "pty%d-to-master", unit);
|
||||
char pipename[sizeof ("ptyNNNN-from-master-nat")];
|
||||
__small_sprintf (pipename, "pty%d-to-master-nat", unit);
|
||||
res = fhandler_pipe::create (&sec_none, &from_slave, &to_master,
|
||||
fhandler_pty_common::pipesize, pipename, 0);
|
||||
if (res)
|
||||
{
|
||||
errstr = "output pipe for non-cygwin apps";
|
||||
goto err;
|
||||
}
|
||||
|
||||
__small_sprintf (pipename, "pty%d-to-master", unit);
|
||||
res = fhandler_pipe::create (&sec_none, &get_handle (), &to_master_cyg,
|
||||
fhandler_pty_common::pipesize, pipename, 0);
|
||||
if (res)
|
||||
{
|
||||
errstr = "output pipe";
|
||||
goto err;
|
||||
}
|
||||
|
||||
__small_sprintf (pipename, "pty%d-to-master-cyg", unit);
|
||||
res = fhandler_pipe::create (&sec_none, &get_handle (), &to_master_cyg,
|
||||
fhandler_pty_common::pipesize, pipename, 0);
|
||||
if (res)
|
||||
{
|
||||
errstr = "output pipe for cygwin";
|
||||
goto err;
|
||||
}
|
||||
|
||||
__small_sprintf (pipename, "pty%d-to-slave", unit);
|
||||
__small_sprintf (pipename, "pty%d-from-master-nat", unit);
|
||||
/* FILE_FLAG_OVERLAPPED is specified here in order to prevent
|
||||
PeekNamedPipe() from blocking in transfer_input().
|
||||
Accordig to the official document, in order to access the handle
|
||||
|
Loading…
x
Reference in New Issue
Block a user