From 676952b9bd85d03929922c101352a5677979f9e6 Mon Sep 17 00:00:00 2001 From: Dave McCracken Date: Tue, 5 Feb 2002 18:39:27 -0800 Subject: [PATCH] Third version of signal changes for thread groups During the course of developing our pthread library (the NGPT pthread library) it became clear we needed some kernel support for handling signals. This patch helps the library by redirecting all signals sent to tasks in a thread group to the thread group leader. It also defines the tkill() system call so the library can signal a specific task if necessary. Given that as far as I know NGPT is the only user of thread groups, and that this change would benefit any other user of thread groups, I'm submitting this for inclusion in the 2.5 kernel. Note that this patch also adds support for sys_gettid() for the architectures that don't have it. While this could have been split into a spearate patch, it would create conflicts since this patch also adds sys_tkill(), so I felt it was cleaner to leave them together. Dave McCracken ====================================================================== Dave McCracken IBM Linux Base Kernel Team 1-512-838-3059 dmccr@us.ibm.com T/L 678-3059 --- kernel/fork.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'kernel/fork.c') diff --git a/kernel/fork.c b/kernel/fork.c index 8c10cad0e021..bfbae1b15439 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -724,10 +724,10 @@ int do_fork(unsigned long clone_flags, unsigned long stack_start, /* Need tasklist lock for parent etc handling! */ write_lock_irq(&tasklist_lock); - /* CLONE_PARENT and CLONE_THREAD re-use the old parent */ + /* CLONE_PARENT re-uses the old parent */ p->p_opptr = current->p_opptr; p->p_pptr = current->p_pptr; - if (!(clone_flags & (CLONE_PARENT | CLONE_THREAD))) { + if (!(clone_flags & CLONE_PARENT)) { p->p_opptr = current; if (!(p->ptrace & PT_PTRACED)) p->p_pptr = current; -- cgit v1.2.3