Cygwin: AF_UNIX: fix creation of npfs handle

The handle to the device is never needed.  As the name impies,
FSCTL_PIPE_WAIT works on the file system, not on the device level.

Drop opening the device and make sure to open only one handle to NPFS.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen
2018-03-07 15:48:21 +01:00
parent d69bcdd671
commit 2f2a75b7bb
3 changed files with 23 additions and 25 deletions

View File

@@ -149,8 +149,7 @@ const int __collate_load_error = 0;
extern UNICODE_STRING _RDATA ro_u_natdir = _ROU (L"Directory");
extern UNICODE_STRING _RDATA ro_u_natsyml = _ROU (L"SymbolicLink");
extern UNICODE_STRING _RDATA ro_u_natdev = _ROU (L"Device");
extern UNICODE_STRING _RDATA ro_u_npfs = _ROU (L"\\Device\\NamedPipe");
extern UNICODE_STRING _RDATA ro_u_npfs_dir = _ROU (L"\\Device\\NamedPipe\\");
extern UNICODE_STRING _RDATA ro_u_npfs = _ROU (L"\\Device\\NamedPipe\\");
#undef _ROU
/* This is an exported copy of environ which can be used by DLLs