Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch 3/3] attach-fail-reasons: SELinux deny_ptrace
Date: Tue, 06 Mar 2012 08:42:00 -0000	[thread overview]
Message-ID: <20120306084154.GA28267@host2.jankratochvil.net> (raw)
In-Reply-To: <201203060835.q268ZSZY010637@glazunov.sibelius.xs4all.nl>

On Tue, 06 Mar 2012 09:35:28 +0100, Mark Kettenis wrote:
> > +  int save_errno;
> > +
> > +  errno = 0;
> > +  if (ptrace (PTRACE_TRACEME, 0, NULL, NULL) == 0)
> > +    return;
> 
> Setting errno to zero here is pointless isn't it?
> 
> > +  save_errno = errno;

In fact yes, I will remove it.


> >  inf_ptrace_me (void)
> >  {
> >    /* "Trace me, Dr. Memory!"  */
> > +  errno = 0;
> >    ptrace (PT_TRACE_ME, 0, (PTRACE_TYPE_ARG3)0, 0);
> > +  if (errno != 0)
> > +    {
> > +      fprintf_unfiltered (gdb_stderr, _("Cannot create process: %s\n"),
> 
> "Cannot trace process: %s"?

I wanted to make clearly distinct this spawning-process case from the
attaching-process case.  I will change it, it is clear from the context
anyway.


Thanks,
Jan


  reply	other threads:[~2012-03-06  8:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-06  6:18 Jan Kratochvil
2012-03-06  8:35 ` Mark Kettenis
2012-03-06  8:42   ` Jan Kratochvil [this message]
2012-03-06 19:29 ` Tom Tromey
2012-03-08  6:53 ` [suspend] " Jan Kratochvil
2012-03-08 16:43   ` Tom Tromey
2012-03-08 16:46     ` Jan Kratochvil
2012-03-08 17:50       ` Tom Tromey
2012-03-08 16:51     ` Pedro Alves

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=20120306084154.GA28267@host2.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=mark.kettenis@xs4all.nl \
    /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