X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:date:message-id:mime-version :content-type:content-transfer-encoding; q=dns; s=default; b=LNp OouVFlOLrFUOXiX+XZ1cRS1jVRKdHVw0ZM600oVtctAAnUfmnpYCjr4vtcR4hvRm hyJ60SlFxTKQVtbV6kQ+uhtqF4Gjmmv7M3IWyDc+pxr1JELVGKyiPYsLT+uJRlT/ KkIadEr0wvM+xRwtoFm53Zwh27SIYC0puGRhtGgo= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:date:message-id:mime-version :content-type:content-transfer-encoding; s=default; bh=d4D9nUI4E IM3IuhDtvm96PUgsDY=; b=RFwmM7rv6ZNRt/NcyYMJzK+VyiL9rw3bVG5mbbkW6 gopE2lRAKBIemOq+zTANUV+gRdMPxo+z9W1wEZd/YPOSmcB8SKTJavF6gFuCo9iR gm5mnfEENGIFiC1EsBt+MO+uH7z15fG9vUnj0bT/1bSMJYJo80G1ouXXFMg//GCg B8= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: plane.gmane.org To: cygwin AT cygwin DOT com From: Michelle Ma Subject: Ctrl-C does not work from Cygwin for the java program Date: Wed, 3 Dec 2014 21:12:57 +0000 (UTC) Lines: 23 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit User-Agent: Loom/3.14 (http://gmane.org/) X-IsSubscribed: yes 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