Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: Pedro Alves <pedro@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: Workaround for glibc/BZ5983: following a child fork shows stale  	parent threads in the child.
Date: Tue, 19 May 2009 06:26:00 -0000	[thread overview]
Message-ID: <e394668d0905182326r7e481761o28d5445c9362bc05@mail.gmail.com> (raw)
In-Reply-To: <200905181813.48596.pedro@codesourcery.com>

On Mon, May 18, 2009 at 10:13 AM, Pedro Alves <pedro@codesourcery.com> wrote:
> [...]
> +      while (fgets (buf, sizeof (buf), status_file))
> +       {
> +         if (strncmp (buf, "Tgid:", 5) == 0)
> +           {
> +             tgid = strtoul (buf + strlen ("Tgid:"), NULL, 10);
> +             break;
> +           }
> +       }

This works, but only because of an assumption of the strlen including
the trailing NUL in "Tgid:" consuming the TAB between "Tgid:" and the
number.
We should probably document that (or make the parsing more robust).


  reply	other threads:[~2009-05-19  6:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-18 17:13 Pedro Alves
2009-05-19  6:26 ` Doug Evans [this message]
2009-05-19  9:52   ` Andreas Schwab
2009-05-19  9:56   ` Pedro Alves
2009-05-19 14:28   ` Doug Evans

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=e394668d0905182326r7e481761o28d5445c9362bc05@mail.gmail.com \
    --to=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@codesourcery.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