Logging off does not kill process in Windows Server 2003

logoffprocesswindows-server-2003

I have a Windows Server 2003(Enterprise, SP2).

My understanding was that any process created by a user will be terminated when the user loggs off the account. But its not happening. I login via Administrator account. Start a simple java process and logoff. But the process is not killed.

Is there any configuration for this or something?

I am mostly a software programmer and not much in to servers and so I am stuck.
I found out that while logging off,
1) Win32 is supposed to send a CTRL_LOGOFF_EVENT to all processes started by that user.
2) JVM is supposed to handle this event and terminate the VM.

But I can't understand why my java process is not killed when i logoff.

Any idea!!!

Best Answer

Can you shut your process down normally w/o logging out or does it hang in that case as well? Can you instrument your code to investigate where it's getting "stuck" and whether it's getting the signal that you expect? Some of the Sysinternals process utilities link text may show what your process is doing when you expect it to terminate. Can you attach a debugger to the lingering process after you log back in again and look at what it's doing?