This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Cntrl-C Exit and Error Exits Question


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 Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]