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,
The OS can do both.
Normal mode: The OS waits for a specified amount of time for a process to shut down. If it does not, then it asks the user if they want to terminate the process.
Forced mode: The OS waits for a specified amount of time for a process to shut down. If it does not, it terminates it instantly.
Shutdown via the start-menu is normal mode, but APIs offer the forced mode, as well as the normal.