From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8885 invoked by alias); 22 Apr 2008 16:46:26 -0000 Received: (qmail 8870 invoked by uid 22791); 22 Apr 2008 16:46:25 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 22 Apr 2008 16:46:08 +0000 Received: from zps35.corp.google.com (zps35.corp.google.com [172.25.146.35]) by smtp-out.google.com with ESMTP id m3MGk3SP018983 for ; Tue, 22 Apr 2008 17:46:04 +0100 Received: from yw-out-2324.google.com (ywt2.prod.google.com [10.192.20.2]) by zps35.corp.google.com with ESMTP id m3MGk2je003851 for ; Tue, 22 Apr 2008 09:46:02 -0700 Received: by yw-out-2324.google.com with SMTP id 2so1133521ywt.37 for ; Tue, 22 Apr 2008 09:46:02 -0700 (PDT) Received: by 10.150.155.1 with SMTP id c1mr495880ybe.85.1208882761927; Tue, 22 Apr 2008 09:46:01 -0700 (PDT) Received: by 10.151.39.20 with HTTP; Tue, 22 Apr 2008 09:46:01 -0700 (PDT) Message-ID: <8ac60eac0804220946r689605e1pd4803c2aea3a9e07@mail.gmail.com> Date: Tue, 22 Apr 2008 17:56:00 -0000 From: "Paul Pluzhnikov" To: "Paul Pluzhnikov" , gdb-patches@sourceware.org Subject: Re: [RFC] gdb could leave inferior running as a background process In-Reply-To: <20080422155548.GA13076@caradoc.them.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_12346_6901515.1208882761952" References: <8ac60eac0804220741g6b830620h6f83c627fb00474b@mail.gmail.com> <20080422155548.GA13076@caradoc.them.org> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-04/txt/msg00475.txt.bz2 ------=_Part_12346_6901515.1208882761952 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Content-length: 717 On Tue, Apr 22, 2008 at 8:55 AM, Daniel Jacobowitz wrote: > Sorry, don't think this will work reliably. If the target tried to > read after it was resumed but before the call to target_wait, and GDB > had the terminal, then it will have a pending SIGTTIN already at this > point. I see. My preferred way of fixing this was to have warning() restore terminal to inferior if it wasn't ours when warning was called, but that's not how the rest of the code is structured. Would attached patch work better then? Thanks, -- Paul Pluzhnikov 2008-04-22 Paul Pluzhnikov * gdb/target.h (target_resume): Call target_terminal_inferior before resuming inferior. ------=_Part_12346_6901515.1208882761952 Content-Type: text/plain; name=patch.txt Content-Transfer-Encoding: base64 X-Attachment-Id: f_ffcpdoyt0 Content-Disposition: attachment; filename=patch.txt Content-length: 793 MjAwOC0wNC0yMiAgUGF1bCBQbHV6aG5pa292ICA8cHBsdXpobmlrb3ZAZ29v Z2xlLmNvbT4KCiAgICAgKiBnZGIvdGFyZ2V0LmggKHRhcmdldF9yZXN1bWUp OiBDYWxsIHRhcmdldF90ZXJtaW5hbF9pbmZlcmlvciBiZWZvcmUKICAgICBy ZXN1bWluZyBpbmZlcmlvci4KCi0tLSAuLi8uLi8uLi92ZW5kb3Jfc3JjL2dk Yi9nZGItNi44LngvZ2RiL3RhcmdldC5oCTIwMDgtMDMtMjUgMDk6NTE6MzQu Nzc5NjQzMDAwIC0wNzAwCisrKyBnZGIvdGFyZ2V0LmgJMjAwOC0wNC0yMiAw OToyNzoxNi44OTQ2MTAwMDAgLTA3MDAKQEAgLTU3Myw2ICs1NzMsNyBAQCBl eHRlcm4gdm9pZCB0YXJnZXRfZGlzY29ubmVjdCAoY2hhciAqLCBpCiAjZGVm aW5lCXRhcmdldF9yZXN1bWUocHRpZCwgc3RlcCwgc2lnZ25hbCkJCQkJXAog ICBkbyB7CQkJCQkJCQkJXAogICAgIGRjYWNoZV9pbnZhbGlkYXRlKHRhcmdl dF9kY2FjaGUpOwkJCQkJXAorICAgIHRhcmdldF90ZXJtaW5hbF9pbmZlcmlv ciAoKTsJCQkJCVwKICAgICAoKmN1cnJlbnRfdGFyZ2V0LnRvX3Jlc3VtZSkg KHB0aWQsIHN0ZXAsIHNpZ2duYWwpOwkJCVwKICAgfSB3aGlsZSAoMCkKIAo= ------=_Part_12346_6901515.1208882761952--