Thread: disable user break

  1. #1
    Registered User
    Join Date
    Nov 2002

    disable user break

    I am writing a program in which I want to disable the "ctrl c" user break. One idea that I have is to call a second exe that recalls the firs if the proper value is not returned (e.i. if they break then the exe will run again). I read the FAQ about calling an exe from within another exe, but I don't know if this disables the user break. Also, I don't know if there is perhaps a better way do accomplish this end.

    Hurley <><

  2. #2
    Confused Magos's Avatar
    Join Date
    Sep 2001
    For what reason do you want to disable that? It's not fun to pull the plug if your program hangs .

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  3. #3
    S Sang-drax's Avatar
    Join Date
    May 2002
    Göteborg, Sweden
    In CodeWarrior, there's an option that makes the program throw a catch-able exception when the user presses Ctrl+C.
    Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling

  4. #4
    Registered User
    Join Date
    Nov 2002

    other options

    The only programming software that I have access to is Borland Turbo 5.0. Also, I don't necessarily want to capture the input <ctrl+break>, rather, I think that if I nest a program then <ctrl+break> will kill the inner program and the outer program would rerun the inner prog if the data in a certain file is not what it should be (e.i. if inner prog was killed before it finished). The purpose if to create a password program (not for the sake of security, but for the sake of programming) that the user could not <ctrl+break> out of. The next hurdle is to find a file that is accessed even when booting from a disk or in safe mode. This is merely a programming exercise so I don't need to get too involved...


    PS it should be simple enough that hangs won't be a problem

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. function switch help
    By etbjr182 in forum C Programming
    Replies: 9
    Last Post: 02-20-2009, 03:51 PM
  2. Help it won't compile!!!!!
    By esbo in forum C Programming
    Replies: 58
    Last Post: 01-04-2009, 03:22 PM
  3. Looking for feedback on program segment
    By avron in forum C++ Programming
    Replies: 4
    Last Post: 05-07-2007, 04:38 PM
  4. Converting Numbers to Words
    By denizengt in forum C Programming
    Replies: 20
    Last Post: 11-05-2003, 09:19 PM
  5. cant get code to work
    By duffy in forum C Programming
    Replies: 13
    Last Post: 10-20-2002, 05:23 AM