Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Michael Snyder <msnyder@vmware.com>
Cc: Pedro Alves <pedro@codesourcery.com>,
		"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: Fix foll-fork.exp foll-vfork.exp fork-child-threads.exp
Date: Mon, 01 Dec 2008 20:56:00 -0000	[thread overview]
Message-ID: <20081201205547.GA20007@caradoc.them.org> (raw)
In-Reply-To: <493433D7.7080803@vmware.com>

On Mon, Dec 01, 2008 at 10:58:31AM -0800, Michael Snyder wrote:
> I'm not sure if this change goes far enough.
> If a multi-threaded program forks, only the currently
> executing thread survives in the child.  All others are
> left behind (and its not unlikely that the thread library
> is left in an inconsistant state, possibly leading to
> deadlocks).

If you use fork () rather than syscall (SYS_fork), the thread library
ought to clean up first; this is a POSIX supported functionality, I
believe.  I know it works with glibc and on Solaris.  Of course,
Solaris has rfork too which copies threads...

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2008-12-01 20:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-20 19:15 Pedro Alves
2008-11-20 23:52 ` Ulrich Weigand
2008-11-21  1:35   ` Pedro Alves
2008-11-21  1:49     ` Ulrich Weigand
2008-11-21  2:09       ` Pedro Alves
2008-11-21 11:40         ` Ulrich Weigand
2008-11-21 12:58           ` Pedro Alves
2008-12-01 19:01 ` Michael Snyder
2008-12-01 20:56   ` Daniel Jacobowitz [this message]
2008-12-01 22:36     ` Michael Snyder
2008-12-01 21:06   ` Pedro Alves
2008-12-01 22:38     ` Michael Snyder

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=20081201205547.GA20007@caradoc.them.org \
    --to=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    --cc=msnyder@vmware.com \
    --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