Cntrl-C Exit and Error Exits Question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Gentle People:

   Some questions on program exits and exit error handlers.

   I am developing a multi-platform application using Gnu/Gcc tools.

   When you Cntrl-C a program is an exit handler of function called?
Is it possible to attach a user supplied Exit Handler to do some
cleanup like close sockets?

    When I Cntrl-C my program it appears the a socket may be left open
causing errors when I restart the program. So I am thinking about exit
handlers to close sockets, close files, and release memory.

     If a program crashes on a common error like divide by zero, or bad
pointer is it possible to add an error handler to catch and process these
errors?

Thomas Dineen








[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux