Re: [PATCH] use group_leader->pgrp (was Re: setpgid and threads)

From: Jeremy Fitzhardinge
Date: Tue Sep 09 2003 - 00:57:09 EST


On Mon, 2003-09-08 at 21:17, Andrew Morton wrote:
> All other instances of foo->pgrp have been converted to process_group(foo),
> which is foo->group_leader->__pgrp.
>
> Should setpgrp() in a thread affect the group leader? It does...

Eh? sys_setpgid() fails with EINVAL if another thread tries to change
the process group. Oh, I see. setpgrp() is a wrapper which passes
pid=0 to setpgid; sys_setpgid uses current->pid rather than
current->tgid, so it always uses the thread group leader's ID. Looks OK
to me.

J

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/