Re: WIndows process table and process image.



As long as there is one active referece to the process object,
then the process will in the process list.
Zombie processes are normally caused by a handle leak on some other process.

For example this code would cause that

HANDLE hProcess = OpenProcess(PID,...);
TerminateProcess(hProcess,...);

You would need to call CloseHandle(hProcess) to remove
your own reference to the process object.


--
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm


"Chris" <chrisforng@xxxxxxxxxxxxxxxx> wrote in message
news:%232burB1iGHA.3816@xxxxxxxxxxxxxxxxxxxxxxx
Hi,

Please help me understand how Windows process is managed.

My application uses some utility programs such as nslookup and dnscmd.
Fo some cases my application needs to kill those child process by calling
TerminateProcess().

Here is something I cannot understand, after killing a process why the
process is still in process table but its image is gone?

I used Process explorer to check, the process is listed but its image does
not exist.

I tried windbg to connect to the process but windbg told me the process
image is not there.

The process does hold some file handles so its current directory cannot be
removed.

Is there a zambie process in Windows as unix? I cannot find any documents
about Windows Zambie processes.

Thanks,
Chris




.



Relevant Pages

  • Re: Cannot Map a Network Drive in C#
    ... Someone with more of an idea about Windows might be able to help but I think ... I am tring to map the network drive in c# from ASP.NET page and it ... I have used Process object of System.IO namespace to use the net use ...
    (microsoft.public.dotnet.framework)
  • Automating the close of an individual MS Word window
    ... The problem is that we need to close each word document individually, ... but this does not appear possible using the Process object. ... This works ok when I try it with text files since windows opens two ... I have a way around it using the InteropServices to find ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: how can I tell how many window handles are free
    ... mabye the process object ... Now I know that there is a limit of how many windows handles which can be ... Alternatively something I can run from a button to report to a messagebox ...
    (microsoft.public.dotnet.languages.vb)