From 634a41403c1439e1c6f3ee4252cf5a091bcc6921 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sun, 16 Dec 2007 21:21:23 +0000 Subject: * 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. --- winsup/cygwin/fhandler.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'winsup/cygwin/fhandler.h') diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 665dd51e1..45588fef9 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -149,6 +149,7 @@ class fhandler_base path_conv pc; virtual void set_name (path_conv &pc); + virtual void set_name (const char *s) {pc.set_normalized_path (s, false);} int error () const {return pc.error;} void set_error (int error) {pc.error = error;} bool exists () const {return pc.exists ();} @@ -546,6 +547,7 @@ public: int __stdcall fadvise (_off64_t, _off64_t, int) __attribute__ ((regparm (3))); int __stdcall ftruncate (_off64_t, bool) __attribute__ ((regparm (3))); int ready_for_read (int fd, DWORD howlong); + void init (HANDLE, DWORD, mode_t); static int create (fhandler_pipe *[2], unsigned, int); static int create_selectable (LPSECURITY_ATTRIBUTES, HANDLE&, HANDLE&, DWORD); }; -- cgit v1.2.3