Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2007-12-17 00:21:23 +0300
committerChristopher Faylor <me@cgf.cx>2007-12-17 00:21:23 +0300
commit634a41403c1439e1c6f3ee4252cf5a091bcc6921 (patch)
tree5e21dbc7f97ec39c0dc988b2e00de45ff6348fa2 /winsup/cygwin/fhandler.cc
parent68adeb7cdee53b09835d35ee43948c5d1b330fcd (diff)
* dtable.cc (POSIX_NAMED_PIPE): New define.
(POSIX_NAMED_PIPE_LEN): Ditto. (dtable::add_archetype): Use crealloc_abort. (dtable::init_std_file_from_handle): Specifically detect pipe stdin/stdout. Pass name to build_fh_dev so that proper name is recorded. Use binmode of fh if it is set before using get_default_mode. Set proper read/write access when calling init(). (handle_to_fn): Handle pipes. * fhandler.cc (fhandler_base::wait_overlapped): Add some debugging. * fhandler.h (fhandler_base::set_name): Default to just setting the path_conv name. (fhandler_pipe::init): Declare. * pipe.cc (struct pipesync): New struct. (getov_result): New function. Blocks and retrieves the result of an overlay I/O operation. (pipe_handler): New function. (pipesync::pipesync): New function. Initializer for pipesync struct. (handler_pipe::init): Define. Detects attempts to set up a "native" pipe fhandler and creates a thread which accepts input from or output to the non-cygwin pipe, creating a cygwin pipe wrapper around the non-cygwin pipe. (fhandler_pipe::create): Add pipe-specific flags to call to init(). * exceptions.cc (ctrl_c_handler): Lock process while we determine what to do.
Diffstat (limited to 'winsup/cygwin/fhandler.cc')
-rw-r--r--winsup/cygwin/fhandler.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc
index bc30a396c..a479d1b28 100644
--- a/winsup/cygwin/fhandler.cc
+++ b/winsup/cygwin/fhandler.cc
@@ -1639,6 +1639,7 @@ fhandler_base::wait_overlapped (bool& res, bool writing, DWORD *bytes)
switch (WaitForMultipleObjects (n, w4, false, INFINITE))
{
case WAIT_OBJECT_0:
+ debug_printf ("normal read");
if (!bytes ||
GetOverlappedResult (h, get_overlapped (), bytes, false))
res = 1;
@@ -1649,12 +1650,14 @@ fhandler_base::wait_overlapped (bool& res, bool writing, DWORD *bytes)
}
break;
case WAIT_OBJECT_0 + 1:
+ debug_printf ("got a signal");
CancelIo (h);
set_errno (EINTR);
res = 0;
break;
default:
err = GetLastError ();
+ debug_printf ("WFMO error, %E");
goto err;
break;
}