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).
This commit is contained in:
		| @@ -184,7 +184,8 @@ fhandler_fifo::create_pipe_instance (bool first) | |||||||
|   timeout.QuadPart = -500000; |   timeout.QuadPart = -500000; | ||||||
|   status = NtCreateNamedPipeFile (&ph, access, &attr, &io, sharing, |   status = NtCreateNamedPipeFile (&ph, access, &attr, &io, sharing, | ||||||
| 				  first ? FILE_CREATE : FILE_OPEN, 0, | 				  first ? FILE_CREATE : FILE_OPEN, 0, | ||||||
| 				  FILE_PIPE_MESSAGE_TYPE, | 				  FILE_PIPE_MESSAGE_TYPE | ||||||
|  | 				    | FILE_PIPE_REJECT_REMOTE_CLIENTS, | ||||||
| 				  FILE_PIPE_MESSAGE_MODE, | 				  FILE_PIPE_MESSAGE_MODE, | ||||||
| 				  nonblocking, max_instances, | 				  nonblocking, max_instances, | ||||||
| 				  DEFAULT_PIPEBUFSIZE, DEFAULT_PIPEBUFSIZE, | 				  DEFAULT_PIPEBUFSIZE, DEFAULT_PIPEBUFSIZE, | ||||||
|   | |||||||
| @@ -557,7 +557,8 @@ enum | |||||||
| enum | enum | ||||||
| { | { | ||||||
|   FILE_PIPE_BYTE_STREAM_TYPE = 0, |   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 { | typedef struct _FILE_PIPE_PEEK_BUFFER { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user