mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Blaisorblade <blaisorblade_spam@yahoo.it>
To: Daniel Jacobowitz <dan@debian.org>
Cc: Christophe Saout <christophe@saout.de>,
	Chris Wedgwood <cw@f00f.org>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: Fixing UML against NPTL (was: Re: [uml-devel] [PATCH] UML: Use PTRACE_KILL instead of SIGKILL to kill host-OS processes (take #2))
Date: Fri, 12 Nov 2004 01:09:02 +0100	[thread overview]
Message-ID: <200411120109.03149.blaisorblade_spam@yahoo.it> (raw)
In-Reply-To: <20041111184523.GA11578@nevyn.them.org>

On Thursday 11 November 2004 19:45, Daniel Jacobowitz wrote:
> On Thu, Nov 11, 2004 at 07:31:51PM +0100, Christophe Saout wrote:
> > Am Donnerstag, den 11.11.2004, 12:45 -0500 schrieb Daniel Jacobowitz:
> > > Glibc caches the PID.  If you're going to use clone directly, use the
> > > gettid/getpid syscall directly.  It's kind of rude that glibc breaks
> > > getpid in this way; I recommend filing a bug in the glibc bugzilla at
> > > sources.redhat.com.
>
> ... but, thinking about it, they'll probably close it as INVALID.
>
> > If glibc insists on caching the pid, it could also simply invalidate the
> > pid cache in the clone function.

> It currently does this for vfork, but not clone.  Basically, you can't
> call into glibc at all if you use clone.  If you aren't using POSIX
> threads, then the POSIX-compliant library is going to fall to pieces
> around you.  For instance, all the file locking will break, and
> anything else that, like the PID cache, relies on either global or
> per-_thread_ data.

Yes, in fact I guess that the problem is for any _thread variable. And as 
fork() is not a raw syscall, so clone() shouldn't be.

I'll file a bugreport when I have time to do it properly - I don't want to 
hear that "if I go into dirty things using clone(), I get to keep the pieces 
and setup a different TLS for the new process"
-- 
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729

      reply	other threads:[~2004-11-12  0:35 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-03 11:37 [PATCH] UML: Use PTRACE_KILL instead of SIGKILL to kill host-OS processes Chris Wedgwood
2004-11-03 11:47 ` Anton Altaparmakov
2004-11-03 12:08   ` [PATCH] UML: Use PTRACE_KILL instead of SIGKILL to kill host-OS processes (take #2) Chris Wedgwood
2004-11-03 19:28     ` [uml-devel] " Blaisorblade
2004-11-03 20:09       ` Chris Wedgwood
2004-11-03 22:51         ` Blaisorblade
2004-11-03 20:18       ` Gerd Knorr
2004-11-03 20:48         ` Chris Wedgwood
2004-11-04  0:23           ` Blaisorblade
2004-11-03 23:19         ` Blaisorblade
     [not found] ` <200411040113.27747.blaisorblade_spam@yahoo.it>
     [not found]   ` <20041104003943.GB17467@taniwha.stupidest.org>
2004-11-04  4:31     ` Fixing UML against NPTL (was: Re: [uml-devel] [PATCH] UML: Use PTRACE_KILL instead of SIGKILL to kill host-OS processes (take #2)) Blaisorblade
2004-11-11 17:45       ` Daniel Jacobowitz
2004-11-11 18:31         ` Christophe Saout
2004-11-11 18:45           ` Daniel Jacobowitz
2004-11-12  0:09             ` Blaisorblade [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=200411120109.03149.blaisorblade_spam@yahoo.it \
    --to=blaisorblade_spam@yahoo.it \
    --cc=christophe@saout.de \
    --cc=cw@f00f.org \
    --cc=dan@debian.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®