public inbox for
 help / color / mirror / Atom feed
From: Takashi Yano <>
Subject: [PATCH] Cygwin: pty: Rename input named pipes.
Date: Sun, 21 Mar 2021 12:59:53 +0900	[thread overview]
Message-ID: <> (raw)

- Currently, the name of input pipe is "ptyNNNN-from-master" for
  cygwin process, and "ptyNNNN-to-slave" for non-cygwin process.
  These are not only inconsistent with output pipes but also very
  With this patch, these are renamed to "ptyNNNN-from-master-cyg"
  and "ptyNNNN-from-master" respectively.
 winsup/cygwin/ | 2 +-
 winsup/cygwin/          | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/winsup/cygwin/ b/winsup/cygwin/
index 643a357ad..02e94efcc 100644
--- a/winsup/cygwin/
+++ b/winsup/cygwin/
@@ -2787,7 +2787,7 @@ fhandler_pty_master::setup ()
       goto err;
-  __small_sprintf (pipename, "pty%d-to-slave", unit);
+  __small_sprintf (pipename, "pty%d-from-master", 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
diff --git a/winsup/cygwin/ b/winsup/cygwin/
index 3c016315c..269b87735 100644
--- a/winsup/cygwin/
+++ b/winsup/cygwin/
@@ -159,8 +159,8 @@ tty::not_allocated (HANDLE& r, HANDLE& w)
   /* Attempt to open the from-master side of the tty.  If it is accessible
      then it exists although we may not have privileges to actually use it. */
-  char pipename[sizeof("ptyNNNN-from-master")];
-  __small_sprintf (pipename, "pty%d-from-master", get_minor ());
+  char pipename[sizeof("ptyNNNN-from-master-cyg")];
+  __small_sprintf (pipename, "pty%d-from-master-cyg", get_minor ());
   /* fhandler_pipe::create returns 0 when creation succeeds */
   return fhandler_pipe::create (&sec_none, &r, &w,
 				fhandler_pty_common::pipesize, pipename,

             reply	other threads:[~2021-03-21  4:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-21  3:59 Takashi Yano [this message]
2021-03-22 11:49 ` Corinna Vinschen
2021-03-23  0:38   ` Takashi Yano
2021-03-23  9:32     ` Corinna Vinschen
2021-03-23 11:49       ` Takashi Yano

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:

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

  git send-email \ \ \ \

* 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).