On Sun, 2019-05-26 at 00:49 -0600, Brian Inglis wrote:
> To a degree, depends on installed Cygwin packages and Windows features, but I
> also have in both Cygwin /{,{,usr/}s}bin and /Windows/{,System32{,/OpenSSH}/:
>
> {"certutil", 0},
> {"comp", 0},
> {"ftp", 0},
>
This gets a handle to the Windows named pipe file system directory.
It replaces the three identical functions of the same name in the
classes fhandler_pipe, fhandler_fifo, and fhandler_socket_unix.
---
winsup/cygwin/fhandler.cc | 30 +
winsup/cygwin/fhandler.h
There are no longer any classes derived from it.
Also remove the 'was_nonblocking' flag, which was needed only for
fhandler_base_overlapped.
---
winsup/cygwin/fhandler.cc | 383 --
winsup/cygwin/fhandler.h | 75 +---
winsup/cygwin/syscalls.cc | 1 -
3
Add methods 'set_pipe_non_blocking' and 'fcntl' to keep the blocking
mode of the Windows pipe in sync with that of the fhandler_pipe
object. This is used for pipes created with the 'pipe' and 'pipe2'
system calls.
---
winsup/cygwin/fhandler.h | 2 ++
winsup/cygwin/fhandler_pipe.cc | 34
The read handles of pipes created by CreateNamedPipe don't have
FILE_WRITE_ATTRIBUTES access unless the pipe is created with
PIPE_ACCESS_DUPLEX. This causes set_pipe_non_blocking to fail on such
handles. To fix this, add a helper function nt_create, which uses
NtCreateNamedPipeFile instead of
fhandler_pipe is currently the only class derived from
fhandler_base_overlapped. This patch series rewrites parts of
fhandler_pipe so that it can be derived from fhandler_base instead.
We can then simplify the code by removing fhandler_base_overlapped.
In particular, this gets rid of the
---
winsup/cygwin/fhandler.h | 2 +
winsup/cygwin/fhandler_pipe.cc | 164 +
2 files changed, 166 insertions(+)
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h
index bdfe4a272..b9cc7b471 100644
--- a/winsup/cygwin/fhandler.h
+++
Make minimal changes so that the build still succeeds.
Previously fhandler_pipe was derived from fhandler_base_overlapped,
which we are going to remove in a future commit.
---
winsup/cygwin/fhandler.h | 5 ++---
winsup/cygwin/fhandler_pipe.cc | 11 +--
2 files changed, 7
To a degree, depends on installed Cygwin packages and Windows features, but I
also have in both Cygwin /{,{,usr/}s}bin and /Windows/{,System32{,/OpenSSH}/:
{"certutil", 0},
{"comp", 0},
{"ftp", 0},
{"scp", 0},
{"sftp", 0},
{"sftp-server", 0},