All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
To: Adam Heath <doogie@debian.org>
Cc: user-mode-linux-devel@lists.sourceforge.net,
	blaisorblade_spam@yahoo.it, jdike@addtoit.com, roli8200@yahoo.de,
	nuno.silva@vgertech.com, antoine@nagafix.co.uk, skoehler@upb.de,
	devel@muhlesteins.com
Subject: Re: [uml-devel] Re: Stop at startup on 2.6 NPTL hosts
Date: Tue, 09 Nov 2004 19:23:28 +0100	[thread overview]
Message-ID: <41910B20.7070102@fujitsu-siemens.com> (raw)
In-Reply-To: <4190FF3C.1060105@fujitsu-siemens.com>

Bodo Stroesser wrote:
> Adam Heath wrote:
> 
>> On Tue, 9 Nov 2004, Bodo Stroesser wrote:
>>
>>
>>> To work around, we could use the by-hand-syscall for os_getpid(). I 
>>> didn't test it,
>>> but I'm quite shure, that it fixes the problem.
>>
>>
>>
>> That would mean each arch has separate asm blocks.  Why not just use the
>> _syscall macros?
> 
> Yes, I agree.
> But before doing any workaround, we should try to get a fixed lib!
> 
Meanwhile I did a test and created a patch for the problem. It's a
workaround only, since I think, the lib should be fixed. But it
works fine linked with NPTL and static, so it could stay with a fixed
lib anyway.

#####################

From: Bodo Stroesser <bstroesser@fujitsu-siemens.com>

Using NPTL, getpid() sometimes delivers the wrong pid, since it
uses a buffered one from previous calls. This buffered pid isn't
discarded, when a child is created by a clone().
So, as a workaround, UML should use a direct kernel call to bypass
the lib.

Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
---

--- a/arch/um/os-Linux/process.c	2004-11-09 18:16:07.149159600 +0100
+++ b/arch/um/os-Linux/process.c	2004-11-09 18:40:43.723686152 +0100
@@ -107,6 +107,8 @@ void os_usr1_process(int pid)
  	kill(pid, SIGUSR1);
  }

+inline _syscall0( pid_t, getpid)
+
  int os_getpid(void)
  {
  	return(getpid());


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

  reply	other threads:[~2004-11-09 18:28 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-29  9:26 [uml-devel] UML Kernel 2.6.7 Nothing happens Roland Kaeser
2004-11-02 18:52 ` Stop at startup on 2.6 NPTL hosts (was: Re: [uml-devel] UML Kernel 2.6.7 Nothing happens) Blaisorblade
2004-11-02 23:43   ` [uml-devel] Re: Stop at startup on 2.6 NPTL hosts Sven Köhler
2004-11-03  3:04   ` Nuno Silva
2004-11-03  8:32     ` Gerd Knorr
2004-11-03 15:59       ` Blaisorblade
2004-11-03 20:10         ` Gerd Knorr
2004-11-03 22:17           ` Blaisorblade
2004-11-03 22:17             ` Blaisorblade
2004-11-04  8:40       ` Nuno Silva
2004-11-09 16:42   ` Bodo Stroesser
2004-11-09 17:29     ` Adam Heath
2004-11-09 17:32       ` Bodo Stroesser
2004-11-09 18:23         ` Bodo Stroesser [this message]
2004-11-09 19:11     ` Blaisorblade
2004-11-10  8:36       ` stian
2004-11-10  9:07         ` Geert Uytterhoeven
2004-11-10 12:15           ` Bodo Stroesser
2004-11-10 12:47             ` Geert Uytterhoeven
2004-11-10 14:32               ` Blaisorblade
2004-11-10 14:44             ` Sven Köhler
2004-11-10 21:19           ` Henrik Nordstrom
2004-11-15 17:17             ` Blaisorblade
2004-11-10 17:16         ` 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=41910B20.7070102@fujitsu-siemens.com \
    --to=bstroesser@fujitsu-siemens.com \
    --cc=antoine@nagafix.co.uk \
    --cc=blaisorblade_spam@yahoo.it \
    --cc=devel@muhlesteins.com \
    --cc=doogie@debian.org \
    --cc=jdike@addtoit.com \
    --cc=nuno.silva@vgertech.com \
    --cc=roli8200@yahoo.de \
    --cc=skoehler@upb.de \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.