Hello everyone,


My question is during system shutdown/reboot, will OS shutdown/reboot wait
for all process to terminate or not? How could OS identify if a process is
terminated or not?

I am suffering a problem when write event log returns 0x80004005 error in my
own code when system is reboot (I monitor this reboot in Event View), I think
OS should always wait for process to complete (e.g. write event log
operation) before stops event log services and reboot? Maybe OS does not wait
until my process completed event log write?


thanks in advance,
George

Re: process termination by Alex

Alex
Wed Jul 16 03:26:26 CDT 2008

"George" wrote:
> My question is during system shutdown/reboot, will OS
> shutdown/reboot wait for all process to terminate or not? How
> could OS identify if a process is terminated or not?

The system sends WM_QUERYENDSESSION message to all top-levl
windows. Read more about how to correctly handle shutdowns here:

"System Shutdown"
http://msdn.microsoft.com/en-us/library/aa376882(VS.85).aspx


HTH
Alex



Re: process termination by George

George
Fri Jul 18 07:06:10 CDT 2008

Thanks Alex,


The reference link is great! One question is not answered. I describe it
below.

Previously, I think event log is always ready even if during system
reboot/shutdown process, so write event log during system reboot never fails
(event log service should be the last service which system should stop before
all other processes stop). Now, the correct conclusion should be, OS does not
ensure the event log service is always avaliable during system reboot?


regards,
George

Re: process termination by Alex

Alex
Fri Jul 18 08:09:14 CDT 2008

"George" wrote:
> Now, the correct conclusion should be, OS does not ensure the
> event log service is always avaliable during system reboot?

Sorry, I don't know the answer.

Alex



Re: process termination by George

George
Sun Jul 20 21:31:14 CDT 2008

Thanks Alex, it is ok.


regards,
George