Thread: ctrl+c handler

  1. #1
    Registered User
    Join Date
    Apr 2008
    Posts
    14

    ctrl+c handler

    Hi!

    I'm making a code that needs to run some functions after a ctrl-c. How can I do that? I can't remember. It's someting to do with signals, right?

    Regards

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Depeneds on the OS. What OS are you using?

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Registered User
    Join Date
    Apr 2008
    Posts
    14
    fedora 6.0, linux basically..
    Last edited by kovitch; 09-16-2008 at 10:48 AM.

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 3
    Last Post: 07-07-2009, 10:05 AM
  2. Signal handler function - pointer to this gets lost
    By maus in forum C++ Programming
    Replies: 1
    Last Post: 07-01-2009, 09:10 AM
  3. unexpected exception handler
    By George2 in forum C++ Programming
    Replies: 2
    Last Post: 01-10-2008, 05:49 AM
  4. interrupt handler functions in Visual C++ 6.0
    By scromer in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 01-07-2002, 07:06 PM