public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org>
To: cygwin-cvs@sourceware.org
Subject: [newlib-cygwin] Cygwin: pty: Rename input/output named pipes.
Date: Tue, 23 Mar 2021 12:19:01 +0000 (GMT)	[thread overview]
Message-ID: <20210323121901.36793385701F@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=ef05e8bdae87b9a72a709a7a7054543aab45992a

commit ef05e8bdae87b9a72a709a7a7054543aab45992a
Author: Takashi Yano via Cygwin-patches <cygwin-patches@cygwin.com>
Date:   Tue Mar 23 20:50:28 2021 +0900

    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.

Diff:
---
 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


                 reply	other threads:[~2021-03-23 12:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210323121901.36793385701F@sourceware.org \
    --to=corinna@sourceware.org \
    --cc=cygwin-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).