From 914f7bf5659525054e54cfb045a0cb22b0e57d5a Mon Sep 17 00:00:00 2001
From: Christopher Faylor <me@cgf.cx>
Date: Sun, 5 Nov 2000 16:47:00 +0000
Subject: [PATCH] * pinfo (wait_subproc): Neverending debug tweaking.

---
 winsup/cygwin/ChangeLog  | 4 ++++
 winsup/cygwin/sigproc.cc | 6 +++---
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 58236d49f..35df963eb 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,7 @@
+Sun Nov  5 11:45:15 2000  Christopher Faylor <cgf@cygnus.com>
+
+	* pinfo (wait_subproc): Neverending debug tweaking.
+
 Sun Nov  5 01:34:51 2000  Christopher Faylor <cgf@cygnus.com>
 
 	* pinfo.cc (winpids:add): New method.
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
index e4bd91527..5e3b21b7e 100644
--- a/winsup/cygwin/sigproc.cc
+++ b/winsup/cygwin/sigproc.cc
@@ -1252,10 +1252,10 @@ wait_subproc (VOID *)
 	    else
 	      {
 		system_printf ("nchildren %d, event[%d] %p, pchildren[%d] %p, events[0] %p, %E",
-			       nchildren, i, events[i], i, (_pinfo *) pchildren[i], events[0]);
+			       nchildren, i, events[i], i - 1, (_pinfo *) pchildren[i - 1], events[0]);
 		system_printf ("pid %d, dwProcessId %u, progname '%s'",
-			       pchildren[i]->pid, pchildren[i]->dwProcessId,
-			       pchildren[i]->progname);
+			       pchildren[i - 1]->pid, pchildren[i - 1]->dwProcessId,
+			       pchildren[i - 1]->progname);
 	      }
 	  break;
 	}