From: Valeri DOT Faine AT cern DOT ch ("Valery Fine") Subject: RE: Ctrl-C crashes bash 10 Mar 1997 03:28:01 -0800 Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <199703100812.JAA25428.cygnus.gnu-win32@sp057.cern.ch> Comments: Authenticated sender is Original-To: gnu-win32 AT cygnus DOT com Original-CC: sos AT prospect DOT com DOT ru, reese AT erc DOT msstate DOT edu, sam AT inf DOT enst DOT fr X-Confirm-Reading-To: "Valery Fine" X-pmrqc: 1 X-mailer: Pegasus Mail for Windows (v2.23) Original-Sender: owner-gnu-win32 AT cygnus DOT com On 9 Mar 97 at 12:49, Sergey Okhapkin wrote: > Samuel Tardieu wrote: > > > > Bob> a. Does anybody else have the problem that using control-C to > > Bob> terminate a running program crashes bash? > > > > This problem occured for me under Win95 but doesn't seem to show > > up under WinNT. > > > > On Windows NT 4.0 too... > It was posted several times to this list but so far no reply seen. The problem is (according Microsoft): " .... Note SIGINT is not supported for any Win32 application including Windows NT and Windows 95. When a CTRL+C interrupt occurs, Win32 operating systems generate a new thread to specifically handle that interrupt. This can cause a single-thread application such as UNIX, to become multithreaded, resulting in unexpected behavior. ================================ !!!! .... " The worst thing is (by Microsoft again): " TerminateThread is a dangerous function that should only be used in the most extreme cases". One workaround for this is present with "Microsoft System Journal", March, 96. (See source code on Web http://www.msj.com) Valery ================================================================= Dr. Valery Fine Telex : 911621 dubna su ----------- LCTA/Joint Inst.for NuclearRes Phone : +7 09621 6 40 80 141980 Dubna, Moscow region Fax : +7 09621 6 51 45 Russia mailto:fine AT main1 DOT jinr DOT dubna DOT su mailto:fine AT vxcern DOT cern DOT ch Dr. Valeri Faine ------------ Phone: +41 22 767 6468 CERN FAX : +41 22 782 2601 CH-1211 Geneva, 23 mailto:fine AT vxcern DOT cern DOT ch Switzerland http://nicewww.cern.ch/~fine - For help on using this list, send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".