Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs Date: Thu, 19 Jun 2003 14:25:20 -0400 (EDT) From: Igor Pechtchanski Reply-To: cygwin AT cygwin DOT com To: cygwin AT cygwin DOT com Subject: Re: gdb attach/detach kills the target process In-Reply-To: <20030619181441.GA6540@redhat.com> Message-ID: Importance: Normal MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Thu, 19 Jun 2003, Christopher Faylor wrote: > On Wed, Jun 18, 2003 at 07:33:38PM -0400, Igor Pechtchanski wrote: > >On 18 Jun 2003, Sam Steingold wrote: > >>run a process in a cygwin window, find out its PID, run gdb in another > >>window, attach to that process, then detach from it. the target > >>process stops responding as soon as it is attached to. detaching > >>changes nothing. only after I exit gdb, I get the original window > >>responding, with the terminal in raw start (need to do "reset" in bash) > >>and the process that gdb attached to dead. > >> > >>I tested this on python and clisp. > > > >That's the way Windows debugging works -- once you attach to a process, > >detaching from it kills the process. No way around it. Furthermore, > >the process is killed using the Windows APIs, thus no signal ever > >reaches the process and no cleanup is performed. > > That's not entirely true. Detaching works ok on Windows XP. > cgf Umm, yes, Corinna has mentioned this too. I don't work with WinXP, so I didn't know about it. However, had the OP worked in WinXP, he wouldn't have had the above problem in the first place, so I can assume he's working in some other OS, and thus his problem is inherent in the API. Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "I have since come to realize that being between your mentor and his route to the bathroom is a major career booster." -- Patrick Naughton -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/