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

linkmanlinkman Member liao changbinOrganization: huhan universityProject: scada
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

  • linkmanlinkman Member liao changbinOrganization: huhan universityProject: scada
    why no answer?

    I have wait a week!
  • marcmarc FloridaAdministrators, ZeroC Staff Marc LaukienOrganization: ZeroC, Inc.Project: The Internet Communications Engine ZeroC Staff
    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 [email protected] for a commercial support agreement.
  • linkmanlinkman Member liao changbinOrganization: huhan universityProject: scada
    But I just a student

    Sorry for my poor English, I just like ICE , and use it in my paper.
  • MinthosMinthos Member Espen OveraaeOrganization: University of Oslo (student)Project: Various personal projects
    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.
Sign In or Register to comment.