[lkml]   [2003]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] bug in setpgid()? process groups and thread groups
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 `---------------------------
Version: GnuPG v1.2.1 (GNU/Linux)


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:47    [W:0.067 / U:29.780 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site