public inbox for cygwin-cvs@sourceware.org help / color / mirror / Atom feed
From: Ken Brown <kbrown@sourceware.org> To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: FIFO: use FILE_PIPE_REJECT_REMOTE_CLIENTS flag Date: Sun, 22 Dec 2019 21:00:00 -0000 [thread overview] Message-ID: <20191222210025.127205.qmail@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=3bc79b275ef2ac0a2bb6805183e62baa29b6a1a2 commit 3bc79b275ef2ac0a2bb6805183e62baa29b6a1a2 Author: Ken Brown <kbrown@cornell.edu> Date: Sat Dec 21 17:53:52 2019 -0500 Cygwin: FIFO: use FILE_PIPE_REJECT_REMOTE_CLIENTS flag Add that flag to the pipe type argument when creating the Windows named pipe. And add a definition of that flag to ntdll.h (copied from /usr/include/w32api/ddk/ntifs.h). Diff: --- winsup/cygwin/fhandler_fifo.cc | 3 ++- winsup/cygwin/ntdll.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index 92797ce..fd82230 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -184,7 +184,8 @@ fhandler_fifo::create_pipe_instance (bool first) timeout.QuadPart = -500000; status = NtCreateNamedPipeFile (&ph, access, &attr, &io, sharing, first ? FILE_CREATE : FILE_OPEN, 0, - FILE_PIPE_MESSAGE_TYPE, + FILE_PIPE_MESSAGE_TYPE + | FILE_PIPE_REJECT_REMOTE_CLIENTS, FILE_PIPE_MESSAGE_MODE, nonblocking, max_instances, DEFAULT_PIPEBUFSIZE, DEFAULT_PIPEBUFSIZE, diff --git a/winsup/cygwin/ntdll.h b/winsup/cygwin/ntdll.h index e19cc8a..1c07d02 100644 --- a/winsup/cygwin/ntdll.h +++ b/winsup/cygwin/ntdll.h @@ -557,7 +557,8 @@ enum enum { FILE_PIPE_BYTE_STREAM_TYPE = 0, - FILE_PIPE_MESSAGE_TYPE = 1 + FILE_PIPE_MESSAGE_TYPE = 1, + FILE_PIPE_REJECT_REMOTE_CLIENTS = 2 }; typedef struct _FILE_PIPE_PEEK_BUFFER {
reply other threads:[~2019-12-22 21:00 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=20191222210025.127205.qmail@sourceware.org \ --to=kbrown@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: linkBe 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).