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>2000-10-17 05:42:04 +0400
committerChristopher Faylor <me@cgf.cx>2000-10-17 05:42:04 +0400
commit92e1969051640fe2c25a8862162eb1a59bd0b888 (patch)
treef5ec28a82dbf3c1d02b647487934de9fc9db57c1 /winsup/cygwin/debug.cc
parent166b2571ce446b4085d4c2067b0d0d36c608f131 (diff)
* debug.cc (add_handle): Issue warning on attempts to add the same handle more
than once. * fhandler_tty.cc (fhandler_tty_slave::open): Protect some handles. (fhandler_tty_common::close): Use proper name when closing handles. (fhandler_pty_master::close): Don't close to_slave or from_slave since they've already been closed earlier in the function. * sigproc.cc (proc_subproc): Don't protect vchild->hProcess. Expect that the caller will do this, instead. * tty.cc (tty_list::terminate): Use proper name when closing handles. (tty::make_pipes): Protect some handles.
Diffstat (limited to 'winsup/cygwin/debug.cc')
-rw-r--r--winsup/cygwin/debug.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/winsup/cygwin/debug.cc b/winsup/cygwin/debug.cc
index 8ab767c31..e25dc1ca8 100644
--- a/winsup/cygwin/debug.cc
+++ b/winsup/cygwin/debug.cc
@@ -246,8 +246,14 @@ add_handle (const char *func, int ln, HANDLE h, const char *name)
handle_list *hl;
lock_debug ();
- if (find_handle (h))
- goto out; /* Already did this once */
+ if ((hl = find_handle (h)))
+ {
+ system_printf ("%s:%d - multiple attempts to add handle %s<%p>", func,
+ ln, name, h);
+ system_printf (" previously allocated by %s:%d(%s<%p>)",
+ hl->func, hl->ln, hl->name, hl->h);
+ goto out; /* Already did this once */
+ }
if ((hl = newh()) == NULL)
{