process termination

This is a discussion on process termination within the Windows Programming forums, part of the Platform Specific Boards category; Hello everyone, My question is during system shutdown/reboot, will OS shutdown/reboot wait for all process to terminate or not? How ...

  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    1,579

    process termination

    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

  2. #2
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,538
    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.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. init adopts zombie process?
    By password636 in forum Linux Programming
    Replies: 4
    Last Post: 07-01-2009, 10:05 AM
  2. create a child process that creates a child process
    By cus in forum Linux Programming
    Replies: 9
    Last Post: 01-13-2009, 01:14 PM
  3. Replies: 3
    Last Post: 10-15-2008, 09:24 AM
  4. Problem with forking a process
    By Unitedroad in forum C Programming
    Replies: 10
    Last Post: 10-04-2007, 01:43 AM
  5. process programming
    By St0rM-MaN in forum Linux Programming
    Replies: 2
    Last Post: 09-15-2007, 07:53 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21