linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ulrich Drepper <drepper@redhat.com>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Linux Kernel List <linux-kernel@vger.kernel.org>,
	Roland McGrath <roland@redhat.com>, Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH] bug in setpgid()? process groups and thread groups
Date: Sat, 02 Aug 2003 01:20:05 -0700	[thread overview]
Message-ID: <3F2B7435.7070101@redhat.com> (raw)
In-Reply-To: <1059811048.18516.43.camel@ixodes.goop.org>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jeremy Fitzhardinge wrote:

> I think there's a bug in setpgid().  At present, it only allows the
> thread group leader to change process groups, but it doesn't change the
> other threads in the thread group to the new process group.

The PGID is not the only value which is handled incorrectly like this.
The PID, GID, etc all need to be treated similarly.

Your approach with iterating over the threads is not acceptable (at
least to me).  It is racy (concurrent runs are not synchronized) and has
a non-constant time.  We've sketched out already a mechanism which
solves to problem.  Basically, most of the time the value from the
thread group leader is used (just follow the pointer).  Then setting the
value is an atomic operation an constant.

The problem is that Linus already said it is too late for this for 2.6.
 So we are waiting for a signal that the time is right.  The changes
will be substantial since all the different IDs should be covered.

- -- 
- --------------.                        ,-.            444 Castro Street
Ulrich Drepper \    ,-----------------'   \ Mountain View, CA 94041 USA
Red Hat         `--' drepper at redhat.com `---------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE/K3Q12ijCOnn/RHQRAonMAJ9L5s/ZH682oq3/gT6OfNcC+V+QTACdFESs
bwhXkcCynmDdtszLiE5OZn8=
=fyzs
-----END PGP SIGNATURE-----


  reply	other threads:[~2003-08-02  8:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-02  7:57 [PATCH] bug in setpgid()? process groups and thread groups Jeremy Fitzhardinge
2003-08-02  8:20 ` Ulrich Drepper [this message]
2003-08-02  8:50   ` Jeremy Fitzhardinge
2003-08-02 19:08     ` Roland McGrath
2003-08-02 20:30       ` Nicholas Miell
2003-08-02 20:51       ` Alan Cox
2003-08-03  7:22         ` Florian Weimer
2003-08-03 21:00           ` Alan Cox
2003-08-03  4:15       ` Jeremy Fitzhardinge
2003-08-02 18:39   ` William Lee Irwin III

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=3F2B7435.7070101@redhat.com \
    --to=drepper@redhat.com \
    --cc=akpm@osdl.org \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=roland@redhat.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;
as well as URLs for NNTP newsgroup(s).