Archived

This forum has been archived. Please start a new discussion on GitHub.

why "Ctrl+c" different from "close button of console window"

my demo appication is :

class DemoApp : virtual public Ice::Service
{
...
}

when click Ctrl+C, the log of my appication is:
17:03:27.234 Thread5476 INFORMATION Program BEGIN.
17:03:28.234 Thread5476 INFORMATION ICE startting ...
......
17:03:28.390 Thread5476 INFORMATION ICE startted.
......
17:03:38.859 Thread5476 INFORMATION ICE stopping...
......
17:03:40.093 Thread5476 INFORMATION ICE stopped.
17:03:40.296 Thread5476 INFORMATION Program END.

when click close button of the console windows,the log of my appication is:
17:03:27.234 Thread5476 INFORMATION Program BEGIN.
17:03:28.234 Thread5476 INFORMATION ICE startting ...
......
17:03:28.390 Thread5476 INFORMATION ICE startted.
......
17:03:38.859 Thread5476 INFORMATION ICE stopping...

why "Ctrl+c" different from "close button of console window"?

Ice version (Ice 3.4.1)
Compiler version (Visual Studio 2008)
Operating system (Windows xp)

Comments

  • why no answer?

    I have wait a week!
  • marc
    marc Florida
    Please note that there is no guarantee that we will provide free support here in these forums. If you require timely responses and guaranteed problem resolution times from ZeroC, please contact us at sales@zeroc.com for a commercial support agreement.
  • But I just a student

    Sorry for my poor English, I just like ICE , and use it in my paper.
  • I don't know how it works in windows, but on unix/linux systems the program gets signalled by the os when something happens. Ctrl+C sends the signal SIGINT. When you close the terminal window, another signal gets sent, I don't know which.

    What you can do do diagnose this is trap all signals you can, and see if you can log the specific signal and shutdown the program.