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-09 07:31:10 +0400
committerChristopher Faylor <me@cgf.cx>2000-10-09 07:31:10 +0400
commitaaf0dee2609f1cdb0fbe181a4f00e0c600e78a9c (patch)
tree4af57f4254a988850a95751d5b50f79502aa7c1b /winsup/utils/strace.cc
parent164a681ca55419ec2cc7c9ad45f720f4a79cada1 (diff)
* ps.cc (main): Change order of reporting slightly so that windows pids are
more obvious. * strace.cc (add_child): Just add child's pid directly. (remove_child): No need to close the child process pid since ContinueDebugEvent does that automatically. (proc_child): Ditto for child thread.
Diffstat (limited to 'winsup/utils/strace.cc')
-rw-r--r--winsup/utils/strace.cc10
1 files changed, 1 insertions, 9 deletions
diff --git a/winsup/utils/strace.cc b/winsup/utils/strace.cc
index dc6795cbb..a958aa431 100644
--- a/winsup/utils/strace.cc
+++ b/winsup/utils/strace.cc
@@ -93,10 +93,7 @@ add_child (DWORD id, HANDLE hproc)
children.next->next = c;
lastid = children.next->id = id;
HANDLE me = GetCurrentProcess ();
- if (!DuplicateHandle (me, hproc, me, &children.next->hproc, PROCFLAGS,
- FALSE, DUPLICATE_CLOSE_SOURCE))
- error (0, "couldn't duplicate %p,%p", me, hproc);
- lasth = children.next->hproc;
+ lasth = children.next->hproc = hproc;
}
static child_list *
@@ -120,7 +117,6 @@ remove_child (DWORD id)
if (c->next->id == id)
{
child_list *c1 = c->next;
- close_handle (c1->hproc, id);
c->next = c1->next;
delete c1;
return;
@@ -516,15 +512,11 @@ proc_child (unsigned mask, FILE *ofile)
case CREATE_PROCESS_DEBUG_EVENT:
if (ev.u.CreateProcessInfo.hFile)
CloseHandle (ev.u.CreateProcessInfo.hFile);
- if (ev.u.CreateProcessInfo.hThread)
- CloseHandle (ev.u.CreateProcessInfo.hThread);
add_child (ev.dwProcessId, ev.u.CreateProcessInfo.hProcess);
processes++;
break;
case CREATE_THREAD_DEBUG_EVENT:
- if (ev.u.CreateThread.hThread)
- CloseHandle (ev.u.CreateThread.hThread);
break;
case LOAD_DLL_DEBUG_EVENT: