From: Daniel Jacobowitz <dan@debian.org>
To: Blaisorblade <blaisorblade_spam@yahoo.it>
Cc: 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: Thu, 11 Nov 2004 12:45:12 -0500 [thread overview]
Message-ID: <20041111174512.GA27809@nevyn.them.org> (raw)
In-Reply-To: <200411040531.29596.blaisorblade_spam@yahoo.it>
On Thu, Nov 04, 2004 at 05:31:21AM +0100, Blaisorblade wrote:
> 2) getpid() on a child clone returns the process's pid when run with a
> NPTL-enabled glibc, while it returns the thread pid with a LinuxThreads one;
> this causes tons of problems with UML, which uses signals as inter-thread and
> intra-thread communication.
>
> Note UML is not using pthread_create() to create the threads, where this
> behaviour is an improvement. I'm using a plain clone() call without the
> CLONE_THREAD flag (which is not even added in by glibc, according to strace).
>
> I've not yet checked if glibc is hijacking getpid() or not, but that would be
> strange anyway.
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.
--
Daniel Jacobowitz
next prev parent reply other threads:[~2004-11-11 18:01 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 [this message]
2004-11-11 18:31 ` Christophe Saout
2004-11-11 18:45 ` Daniel Jacobowitz
2004-11-12 0:09 ` Blaisorblade
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=20041111174512.GA27809@nevyn.them.org \
--to=dan@debian.org \
--cc=blaisorblade_spam@yahoo.it \
--cc=cw@f00f.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