This is the mail archive of the cygwin mailing list for the Cygwin 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]

Ctrl-C does not work from Cygwin for the java program


I have a java program with adding a shutdown hook:

public class Test {

   public static void main(String args[]) {

    Runtime.getRuntime().addShutdownHook(new Thread() {
       public void run() { 
          System.out.println("Called");  // Ouput
       }
    });

   for(;;);
  }
}

If I type Ctrl-C from the windows command prompt, the "Ouput" line got 
called. However, if I type Ctrl-c from the Cygwin, the "Output" line 
didn't get called.

Can someone help me out?

Thanks


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]