Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "J. Johnston" <jjohnstn@redhat.com>
To: Kevin Buettner <kevinb@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: RFA: infptrace fix
Date: Tue, 25 Feb 2003 19:40:00 -0000	[thread overview]
Message-ID: <3E5BC699.4090404@redhat.com> (raw)
In-Reply-To: <1030225001024.ZM8081@localhost.localdomain>

Kevin Buettner wrote:
> On Feb 24,  6:31pm, J. Johnston wrote:
> 
> 
>>The following patch fixes a problem on linux regarding attached
>>processes.  When gdb quits, it goes to detach the process.  If the
>>process has already been killed, the ptrace detach call sets errno.
>>This causes infptrace.c: detach() to issue a perror_with_name()
>>call which eventually gets caught and the user is returned to the
>>gdb prompt.  If we try and quit again, we go through the same
>>sequence and so on and so on.
>>
>>The patch recognizes if errno is set to ESRCH, indicating that the
>>process cannot be found which is ok and should not result in an
>>error being flagged.
>>
>>Ok to install?
>>
>>
>>-- Jeff J.
>>
>>2003-02-24  Jeff Johnston  <jjohnstn@redhat.com>
>>
>>	* infptrace.c (detach): Do not flag error if ptrace detach fails and
>>	errno is set to ESRCH.
> 
> 
> This is okay.
> 
> (For other errors during detach, I wonder if it'd make sense to just
> issue a warning which decodes the errno...)
>

Thanks Kevin.  Patch applied.  I also wondered if a warning should be issued
but I do not know what other errors can occur with the detach operation.  I
also considered moving the attached_flag reset to before the error check so
at least we didn't come back to detach it again and again.

-- Jeff J.




      reply	other threads:[~2003-02-25 19:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-24 23:31 J. Johnston
2003-02-25  0:10 ` Kevin Buettner
2003-02-25 19:40   ` J. Johnston [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3E5BC699.4090404@redhat.com \
    --to=jjohnstn@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=kevinb@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox