public inbox for cygwin-patches@cygwin.com
 help / color / mirror / Atom feed
* [PATCH] Cygwin: pty: Rename input/output named pipes.
@ 2021-03-23 11:50 Takashi Yano
  2021-03-23 12:26 ` Corinna Vinschen
  0 siblings, 1 reply; 2+ messages in thread
From: Takashi Yano @ 2021-03-23 11:50 UTC (permalink / raw)
  To: cygwin-patches

- 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.
---
 winsup/cygwin/fhandler_tty.cc | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index 643a357ad..d755f7d87 100644
--- a/winsup/cygwin/fhandler_tty.cc
+++ b/winsup/cygwin/fhandler_tty.cc
@@ -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";
+      errstr = "output pipe for non-cygwin apps";
       goto err;
     }
 
-  __small_sprintf (pipename, "pty%d-to-master-cyg", unit);
+  __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 for cygwin";
+      errstr = "output pipe";
       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
-- 
2.31.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Cygwin: pty: Rename input/output named pipes.
  2021-03-23 11:50 [PATCH] Cygwin: pty: Rename input/output named pipes Takashi Yano
@ 2021-03-23 12:26 ` Corinna Vinschen
  0 siblings, 0 replies; 2+ messages in thread
From: Corinna Vinschen @ 2021-03-23 12:26 UTC (permalink / raw)
  To: cygwin-patches

On Mar 23 20:50, Takashi Yano via Cygwin-patches wrote:
> - 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.
> ---
>  winsup/cygwin/fhandler_tty.cc | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)

Pushed.


Thanks,
Corinna

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-23 12:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-23 11:50 [PATCH] Cygwin: pty: Rename input/output named pipes Takashi Yano
2021-03-23 12:26 ` Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).