Cygwin: fhandler_pipe.cc:nt_select: fix flags
This commit is contained in:
parent
24b7a74b94
commit
9d4e58be76
|
@ -658,7 +658,7 @@ nt_create (LPSECURITY_ATTRIBUTES sa_ptr, PHANDLE r, PHANDLE w,
|
||||||
&cygheap->installation_key,
|
&cygheap->installation_key,
|
||||||
GetCurrentProcessId ());
|
GetCurrentProcessId ());
|
||||||
|
|
||||||
access = GENERIC_READ | FILE_WRITE_ATTRIBUTES;
|
access = GENERIC_READ | FILE_WRITE_ATTRIBUTES | SYNCHRONIZE;
|
||||||
|
|
||||||
ULONG pipe_type = pipe_byte ? FILE_PIPE_BYTE_STREAM_TYPE
|
ULONG pipe_type = pipe_byte ? FILE_PIPE_BYTE_STREAM_TYPE
|
||||||
: FILE_PIPE_MESSAGE_TYPE;
|
: FILE_PIPE_MESSAGE_TYPE;
|
||||||
|
@ -688,8 +688,8 @@ nt_create (LPSECURITY_ATTRIBUTES sa_ptr, PHANDLE r, PHANDLE w,
|
||||||
timeout.QuadPart = -500000;
|
timeout.QuadPart = -500000;
|
||||||
status = NtCreateNamedPipeFile (r, access, &attr, &io,
|
status = NtCreateNamedPipeFile (r, access, &attr, &io,
|
||||||
FILE_SHARE_READ | FILE_SHARE_WRITE,
|
FILE_SHARE_READ | FILE_SHARE_WRITE,
|
||||||
FILE_CREATE, 0, pipe_type,
|
FILE_CREATE, FILE_SYNCHRONOUS_IO_NONALERT,
|
||||||
FILE_PIPE_BYTE_STREAM_MODE,
|
pipe_type, FILE_PIPE_BYTE_STREAM_MODE,
|
||||||
0, 1, psize, psize, &timeout);
|
0, 1, psize, psize, &timeout);
|
||||||
|
|
||||||
if (NT_SUCCESS (status))
|
if (NT_SUCCESS (status))
|
||||||
|
@ -737,8 +737,9 @@ nt_create (LPSECURITY_ATTRIBUTES sa_ptr, PHANDLE r, PHANDLE w,
|
||||||
{
|
{
|
||||||
debug_printf ("NtOpenFile: name %S", &pipename);
|
debug_printf ("NtOpenFile: name %S", &pipename);
|
||||||
|
|
||||||
access = GENERIC_WRITE | FILE_READ_ATTRIBUTES;
|
access = GENERIC_WRITE | FILE_READ_ATTRIBUTES | SYNCHRONIZE;
|
||||||
status = NtOpenFile (w, access, &attr, &io, 0, 0);
|
status = NtOpenFile (w, access, &attr, &io, 0,
|
||||||
|
FILE_SYNCHRONOUS_IO_NONALERT);
|
||||||
if (!NT_SUCCESS (status))
|
if (!NT_SUCCESS (status))
|
||||||
{
|
{
|
||||||
DWORD err = GetLastError ();
|
DWORD err = GetLastError ();
|
||||||
|
|
Loading…
Reference in New Issue