OpenVZ Forum


Home » Mailing lists » Devel » [PATCH] Use task_pgrp() in task exit
[PATCH] Use task_pgrp() in task exit [message #17516] Thu, 22 February 2007 23:34
Sukadev Bhattiprolu is currently offline  Sukadev Bhattiprolu
Messages: 413
Registered: August 2006
Senior Member
From: Sukadev Bhattiprolu <sukadev@us.ibm.com>
Subject: [PATCH] Use task_pgrp() in task exit

Use container-safe task_pgrp() interface instead of process_group().

Signed-off-by: Sukadev Bhattiprolu <sukadev@us.ibm.com>
Cc: Cedric Le Goater <clg@fr.ibm.com>
Cc: Dave Hansen <haveblue@us.ibm.com>
Cc: Serge Hallyn <serue@us.ibm.com>
Cc: containers@lists.osdl.org
---
 kernel/exit.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Index: lx26-20-mm1/kernel/exit.c
===================================================================
--- lx26-20-mm1.orig/kernel/exit.c	2007-02-16 14:59:28.000000000 -0800
+++ lx26-20-mm1/kernel/exit.c	2007-02-16 15:45:36.000000000 -0800
@@ -958,13 +958,13 @@ asmlinkage void sys_exit_group(int error
 static int eligible_child(pid_t pid, int options, struct task_struct *p)
 {
 	if (pid > 0) {
-		if (p->pid != pid)
+		if (pid_nr(task_pid(p)) != pid)
 			return 0;
 	} else if (!pid) {
-		if (process_group(p) != process_group(current))
+		if (pid_nr(task_pgrp(p)) != pid_nr(task_pgrp(current)))
 			return 0;
 	} else if (pid != -1) {
-		if (process_group(p) != -pid)
+		if (pid_nr(task_pgrp(p)) != -pid)
 			return 0;
 	}
 
_______________________________________________
Containers mailing list
Containers@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/containers
Previous Topic: [PATCH] pidspace coda fs
Next Topic: [PATCH] Use task_session() in signal.c
Goto Forum:
  


Current Time: Thu Oct 09 20:56:24 GMT 2025

Total time taken to generate the page: 0.11177 seconds