Revert "Cygwin: fhandler_pipe.cc:nt_select: fix flags"
This reverts commit a62f4d128505481c4c683e813a3b16da641af6ff.
This commit is contained in:
parent
71f02bcc3f
commit
28eac9272f
|
@ -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 | SYNCHRONIZE;
|
access = GENERIC_READ | FILE_WRITE_ATTRIBUTES;
|
||||||
|
|
||||||
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, FILE_SYNCHRONOUS_IO_NONALERT,
|
FILE_CREATE, 0, pipe_type,
|
||||||
pipe_type, FILE_PIPE_BYTE_STREAM_MODE,
|
FILE_PIPE_BYTE_STREAM_MODE,
|
||||||
0, 1, psize, psize, &timeout);
|
0, 1, psize, psize, &timeout);
|
||||||
|
|
||||||
if (NT_SUCCESS (status))
|
if (NT_SUCCESS (status))
|
||||||
|
@ -737,9 +737,8 @@ 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 | SYNCHRONIZE;
|
access = GENERIC_WRITE | FILE_READ_ATTRIBUTES;
|
||||||
status = NtOpenFile (w, access, &attr, &io, 0,
|
status = NtOpenFile (w, access, &attr, &io, 0, 0);
|
||||||
FILE_SYNCHRONOUS_IO_NONALERT);
|
|
||||||
if (!NT_SUCCESS (status))
|
if (!NT_SUCCESS (status))
|
||||||
{
|
{
|
||||||
DWORD err = GetLastError ();
|
DWORD err = GetLastError ();
|
||||||
|
|
Loading…
Reference in New Issue