diff options
author | Christopher Faylor <me@cgf.cx> | 2009-07-03 18:05:51 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2009-07-03 18:05:51 +0000 |
commit | 3c4f2024a1c4cddd0fc4239827de4f83528c17f7 (patch) | |
tree | ba9c461ab14dd6238396e817d0fe6722cb8f2a74 /winsup/cygwin/pipe.cc | |
parent | 3e62013829163ec02af6671bc38ea4715a8cb8fb (diff) | |
download | cygnal-3c4f2024a1c4cddd0fc4239827de4f83528c17f7.tar.gz cygnal-3c4f2024a1c4cddd0fc4239827de4f83528c17f7.tar.bz2 cygnal-3c4f2024a1c4cddd0fc4239827de4f83528c17f7.zip |
* dcrt0.cc (jit_debug): New global.
(initial_env): Set jit_debug when we are automatically starting a gdb process.
* dtable.cc (dtable::get_debugger_info): Don't tty tricks when we are being
debugged by our own captive gdb, as determined by jit_debug == true.
(dtable::init_std_file_from_handle): Detect errors when initializing a tty
early rather than at random points later.
* fhandler.h (fhandler_*::init): Return int to indicate success/failure.
* fhandler.cc (fhandler_base::init): Reflect change in return value.
* pipe.cc (fhandler_pipe::init): Ditto.
(fhandler_pipe::create_selectable): Don't say we're retrying when we aren't.
* fhandler_console.cc (fhandler_console::init): Ditto. Return success/failure.
* fhandler_serial.cc (fhandler_serial::init): Ditto.
* fhandler_tty.cc (fhandler_tty_slave::init): Ditto.
(fhandler_tty_slave::open): Make debugging output more detailed.
* tty.cc (tty_list::terminate): Don't close I/O handles before all slaves have
checked in.
(tty::slave_alive): Make a non-inlined function. Check if tty pipe handles can
be created as an additional exists check.
* tty.h (tty::slave_alive): Just define here.
Diffstat (limited to 'winsup/cygwin/pipe.cc')
-rw-r--r-- | winsup/cygwin/pipe.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/winsup/cygwin/pipe.cc b/winsup/cygwin/pipe.cc index 787cc398d..e8c7070b1 100644 --- a/winsup/cygwin/pipe.cc +++ b/winsup/cygwin/pipe.cc @@ -29,7 +29,7 @@ fhandler_pipe::fhandler_pipe () uninterruptible_io (true); } -void +int fhandler_pipe::init (HANDLE f, DWORD a, mode_t mode) { // FIXME: Have to clean this up someday @@ -53,6 +53,7 @@ fhandler_pipe::init (HANDLE f, DWORD a, mode_t mode) if (mode & O_NOINHERIT) close_on_exec (true); setup_overlapped (opened_properly); + return 1; } extern "C" int sscanf (const char *, const char *, ...); @@ -259,12 +260,12 @@ fhandler_pipe::create_selectable (LPSECURITY_ATTRIBUTES sa_ptr, HANDLE& r, case ERROR_PIPE_BUSY: /* The pipe is already open with compatible parameters. Pick a new name and retry. */ - debug_printf ("pipe busy, retrying"); + debug_printf ("pipe busy", name ? ", retrying" : ""); break; case ERROR_ACCESS_DENIED: /* The pipe is already open with incompatible parameters. Pick a new name and retry. */ - debug_printf ("pipe access denied, retrying"); + debug_printf ("pipe access denied%s", name ? ", retrying" : ""); break; default: { |