implementaion of exit function

This is a discussion on implementaion of exit function within the C Programming forums, part of the General Programming Boards category; hi all, Can any one tel me how exit() in C is implemented? Thanks in advance...

  1. #1
    Registered User
    Join Date
    May 2007
    Posts
    19

    Question implementaion of exit function

    hi all,

    Can any one tel me how exit() in C is implemented?

    Thanks in advance

  2. #2
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    Nothing a bit of research wouldn't cure. http://www.opengroup.org/onlinepubs/...ions/exit.html

  3. #3
    Registered User
    Join Date
    May 2007
    Posts
    19
    can i know how this exit() function is defined

  4. #4
    Linux is where it's at movl0x1's Avatar
    Join Date
    May 2007
    Posts
    72
    void exit(int status)

  5. #5
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,354
    Quote Originally Posted by msenthil View Post
    hi all,

    Can any one tel me how exit() in C is implemented?

    Thanks in advance
    It is OS-dependent. In general, exit() first runs any exit handler functions that have been registered using atexit(), then it initiates a C library teardown routine (flushes any data remaining in open file handles, releases any specially-acquired resources, etc.). Finally, it makes a system call (OS-dependent) which actually terminates the process.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Odd memory leaks
    By VirtualAce in forum C++ Programming
    Replies: 11
    Last Post: 05-25-2006, 12:56 AM
  2. Game Pointer Trouble?
    By Drahcir in forum C Programming
    Replies: 8
    Last Post: 02-04-2006, 01:53 AM
  3. Why wont my function exit correctly?
    By LightsOut06 in forum C Programming
    Replies: 2
    Last Post: 10-09-2005, 09:23 PM
  4. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  5. Replies: 5
    Last Post: 02-08-2003, 06:42 PM

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